#include <bits/stdc++.h>
using namespace std;
int n, m, k;
map<int, int> cnt;
map<int, bool> ch;
bool tr;
int main() {
  cin >> n >> m;
  int x;
  for (int i = 1; i <= m; ++i) {
    tr = false;
    cin >> k;
    for (int j = 1; j <= k; ++j) {
      cin >> x;
      if (ch.count(x)) continue;
      ch[x];
      if (x < 0) x *= -1;
      ++cnt[x];
    }
    for (auto j : cnt) {
      if (j.second == 2) {
        tr = true;
        break;
      }
    }
    if (!tr) {
      cout << "YES";
      exit(0);
    }
    ch.clear();
    cnt.clear();
  }
  cout << "NO";
  return 0;
}
