#include <bits/stdc++.h>
using namespace std;
int n, m, k, x, a[10010], i, j;
int main() {
  cin >> n >> m;
  for (i = 1; i <= m; i++) {
    int p = 0;
    cin >> k;
    memset(a, 0, sizeof(a));
    for (j = 1; j <= k; j++) {
      cin >> x;
      if (a[abs(x)] == -x) {
        p = 1;
      }
      a[abs(x)] = x;
    }
    if (!p) break;
  }
  if (i > m)
    cout << "NO";
  else
    cout << "YES";
  return 0;
}
