#include <bits/stdc++.h>
int main(void) {
  int n, m, k;
  int i, j, jj;
  int a;
  int *gr;
  int ans, cur;
  scanf("%d %d", &n, &m);
  i = -1;
  ans = 0;
  while (++i < m) {
    scanf("%d", &k);
    j = -1;
    gr = (int *)malloc(k * sizeof(*gr));
    while (++j < k) {
      scanf("%d", gr + j);
    }
    if (k == 1) continue;
    j = -1;
    cur = 0;
    while (++j < k) {
      jj = j;
      while (++jj < k)
        if (gr[j] + gr[jj] == 0) {
          ans += 1;
          cur++;
          break;
        }
      if (cur == 1) break;
    }
    free(gr);
  }
  if (ans == m)
    printf("NO");
  else
    printf("YES");
  return (0);
}
