#include <bits/stdc++.h>
int main() {
  int n, m, i, j, p, t, h, k[10005];
  scanf("%d", &n);
  scanf("%d", &m);
  for (i = 0; i < m; i++) {
    scanf("%d", &h);
    for (j = 0; j < h; j++) {
      scanf("%d", &k[j]);
    }
    t = 0;
    for (j = 0; j < h; j++) {
      for (p = j + 1; p < h; p++) {
        if (k[j] == -k[p]) {
          t = 1;
          break;
        }
      }
      if (t == 1) break;
    }
    if (t == 0) break;
  }
  if (t == 0)
    printf("YES");
  else
    printf("NO");
  return 0;
}
