#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, k, t = 1, s = 0;
  cin >> n >> m;
  for (int i = 0; i < m; i++) {
    cin >> k;
    int g[10000];
    for (int j = 0; j < k; j++) {
      cin >> g[j];
    }
    for (int p = 0; p < k; p++) {
      for (int q = 0; q < k; q++) {
        if (g[p] == (-g[q])) t = 0;
      }
    }
    if (t == 1) {
      s = 1;
    }
    t = 1;
  }
  if (s == 0)
    cout << "NO";
  else
    cout << "YES";
  return 0;
}
