#include #include #include using namespace std; #define Int register int #define MAXN 305 int n,m,k; int du[MAXN]; void read (int &x) { x = 0;char c = getchar();int f = 1; while (c < '0' || c > '9'){if (c == '-') f = -f;c = getchar();} while (c >= '0' && c <= '9'){x = (x << 3) + (x << 1) + c - '0';c = getchar();}\ x *= f;return ; } void write (int x) { if (x < 0){x = -x;putchar ('-');} if (x > 9) write (x / 10); putchar (x % 10 + '0'); } signed main() { int times; read (times); while (times --) { read (n),read (m),read (k); memset (du,0,sizeof (du)); for (Int i = 1;i <= m;++ i) { int u,v; read (u),read (v); du[u] ++,du[v] ++; } int g = 0; for (Int i = 1;i <= n;++ i) { if (du[i] < k) { g = 1; break; } } if (g) puts ("No"); else puts ("Yes"); } }