#include <bits/stdc++.h>
using namespace std;
int n, m, k, val, ap1[(10000 + 7)], ap2[(10000 + 7)];
int main() {
  scanf("%d %d", &n, &m);
  for (; m; --m) {
    scanf("%d", &k);
    bool f = 1;
    for (int i = 1; i <= n; ++i) {
      ap1[i] = 0;
      ap2[i] = 0;
    }
    for (int i = 1; i <= k; ++i) {
      scanf("%d", &val);
      if (val < 0) ap1[-val] = 1;
      if (val > 0) ap2[val] = 1;
    }
    for (int i = 1; i <= n; ++i)
      if (ap1[i] && ap2[i]) {
        f = 0;
        break;
      };
    if (f) {
      printf("YES\n");
      return 0;
    }
  }
  printf("NO\n");
  return 0;
}
