#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  int n, m;
  cin >> n >> m;
  bool g_ok = true;
  for (int i = 0; i < m; ++i) {
    int k;
    cin >> k;
    unordered_set<int> seen;
    bool ok = false;
    for (int i = 0; i < k; ++i) {
      int v;
      cin >> v;
      if (seen.find(v) == seen.end()) {
        if (seen.find(-v) == seen.end()) {
          seen.insert(v);
        } else {
          ok = true;
        }
      }
    }
    g_ok &= ok;
  }
  if (g_ok) {
    cout << "NO";
  } else {
    cout << "YES";
  }
  cout << endl;
  return 0;
}
