#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1.0);
const int inf = 0x3f3f3f3f;
const long long INF = 0x3f3f3f3f3f3f3f3fll;
const int MAX_N = 10010;
int data[10010];
int main() {
  int n, m;
  while (~scanf("%d%d", &n, &m)) {
    int flag = 0;
    for (int i = 0; i < m; ++i) {
      int tot;
      scanf("%d", &tot);
      set<int> S;
      S.clear();
      for (int j = 0; j < tot; ++j) {
        scanf("%d", &data[j]);
        S.insert(data[j]);
      }
      if (flag) continue;
      sort(data, data + tot);
      tot = unique(data, data + tot) - data;
      int find = 0;
      for (int j = 0; j < tot; ++j) {
        if (S.find(-data[j]) != S.end()) {
          find = 1;
          break;
        }
      }
      if (!find) flag = 1;
    }
    if (flag)
      puts("YES");
    else
      puts("NO");
  }
  return 0;
}
