#include <bits/stdc++.h>
using namespace std;
bool a[10001];
bool b[10001];
int main() {
  int n, m;
  cin >> n >> m;
  for (int i = 0; i < m; i++) {
    int k;
    cin >> k;
    memset(a, false, sizeof(a));
    memset(b, false, sizeof(b));
    for (int j = 0; j < k; j++) {
      int y;
      cin >> y;
      if (y >= 0) {
        a[y] = true;
      } else {
        y = -y;
        b[y] = true;
      }
    }
    int flag = 0;
    for (int p = 1; p <= n; p++) {
      if (a[p] == true && b[p] == true) {
        flag = 1;
      }
      if (flag == 0) {
        if (a[p] != b[p]) {
          flag = 2;
        }
      }
    }
    if (flag == 2) {
      cout << "YES" << endl;
      return 0;
    }
  }
  cout << "NO" << endl;
  return 0;
}
