#include <bits/stdc++.h>
using namespace std;
int vis[10500];
int main() {
  int n, m;
  cin >> n >> m;
  bool ok = true;
  for (int i = 1; i <= m; i++) {
    int k;
    cin >> k;
    memset(vis, 0, sizeof(vis));
    bool flg = false;
    for (int i = 1; i <= k; i++) {
      int tmp;
      cin >> tmp;
      if (tmp > 0) {
        if (vis[tmp] < 0) {
          flg = true;
        }
        vis[tmp] = 1;
      } else {
        if (vis[-tmp] > 0) {
          flg = true;
        }
        vis[-tmp] = -1;
      }
    }
    if (!flg) ok = false;
  }
  if (ok)
    cout << "NO\n";
  else
    cout << "YES\n";
}
