#include #include #include #include using namespace std; #define M 305 vector G[M]; int t, n, m, k; int main (){ scanf ("%d", &t); while (t --){ scanf ("%d %d %d", &n, &m, &k); int a, b; for (int i = 1; i <= n; i ++) G[i].clear (); for (int i = 1; i <= m; i ++){ scanf ("%d %d", &a, &b); G[a].push_back (b); G[b].push_back (a); } bool flag = 0; for (int i = 1; i <= n; i ++){ if (G[i].size () < k){ flag = 1; break; } } if (flag){ printf ("No\n"); } else{ printf ("Yes\n"); } } return 0; }