#include <bits/stdc++.h>
using namespace std;
int a[10004][2];
int main() {
  int i, j;
  int n, m;
  while (cin >> n >> m) {
    int flag = 0;
    memset(a, 0, sizeof(a));
    for (i = 0; i < m; i++) {
      int k;
      cin >> k;
      int ans = 0, cnt = 0;
      memset(a, 0, sizeof(a));
      for (j = 0; j < k; j++) {
        int tmp;
        cin >> tmp;
        if (tmp < 0) {
          if (a[-tmp][1]) continue;
          if (a[-tmp][0] == 1) {
            ans--;
          } else {
            ans++;
            a[-tmp][1] = 1;
            cnt++;
          }
        } else {
          if (a[tmp][0]) continue;
          if (a[tmp][1] == 1) {
            ans--;
            a[tmp][1] = 0;
          } else {
            ans++;
            a[tmp][0] = 1;
            cnt++;
          }
        }
      }
      if (ans == cnt) flag = 1;
    }
    if (flag)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
  return 0;
}
