#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n, m, i, j;
  cin >> n >> m;
  int t = 0, fl = 0;
  for (i = 1; i <= m; i++) {
    t = 0;
    int k;
    cin >> k;
    vector<int> v(k + 1);
    set<int> s;
    s.clear();
    for (j = 1; j <= k; j++) {
      int first;
      cin >> first;
      v[j] = first;
      s.insert(first);
    }
    for (j = 1; j <= k; j++) {
      if (s.find(-1 * v[j]) != s.end()) {
        t = 1;
      }
    }
    if (t == 0) {
      fl = 1;
    }
  }
  if (fl == 1)
    cout << "YES";
  else
    cout << "NO";
  return 0;
}
