#include <bits/stdc++.h>
using namespace std;
int a[100000];
int cmp(int a, int b) { return abs(a) < abs(b) ? 1 : 0; }
int main() {
  int n, m, k;
  cin >> n >> m;
  int f = 0;
  for (int i = 1; i <= m; i++) {
    int j;
    cin >> k;
    for (j = 0; j < k; j++) cin >> a[j];
    if (f) continue;
    sort(a, a + k, cmp);
    for (j = 0; j < k - 1; j++) {
      if (a[j] + a[j + 1] == 0) break;
    }
    if (j >= k - 1) f = 1;
  }
  if (f)
    cout << "YES";
  else
    cout << "NO";
  return 0;
}
