#include <bits/stdc++.h>
using namespace std;
int un, m, p[10001], n[10001], i, k, j, a, nn, pn, ii, jj, ans;
bool test;
int main() {
  cin >> un >> m;
  for (i = 1; i <= m; i++) {
    test = false;
    nn = pn = 0;
    cin >> k;
    for (j = 1; j <= k; j++) {
      cin >> a;
      if (a < 0)
        n[++nn] = a;
      else
        p[++pn] = a;
    }
    for (ii = 1; ii <= pn && not test; ii++) {
      for (jj = 1; jj <= nn && not test; jj++)
        if (p[ii] == -n[jj]) {
          test = true;
        }
    }
    if (not test) {
      ans = -1;
      break;
    }
  }
  if (ans == -1)
    cout << "YES";
  else
    cout << "NO";
  return 0;
}
