#include <bits/stdc++.h>
int In[10010];
bool T[20010];
int main() {
  int n, m, k;
  int i, j;
  int s, ans = 0;
  scanf("%d%d", &n, &m);
  for (i = 1; i <= m; i++) {
    scanf("%d", &k);
    for (j = 1; j <= k; j++) {
      scanf("%d", &In[j]);
      In[j] += n;
    }
    s = 0;
    for (j = 1; j <= k; j++) {
      if (T[-(In[j] - n) + n]) s = 1;
      T[In[j]] = 1;
    }
    if (s == 0) ans = 1;
    for (j = 1; j <= k; j++) T[In[j]] = 0;
  }
  if (ans)
    printf("YES");
  else
    printf("NO");
}
