#include <bits/stdc++.h>
using namespace std;
const int N = (int)1e5 + 100;
const int inf = (int)2e9;
int n, m, k, t;
map<int, int> cnt;
bool ok = true, flag;
int main() {
  cin >> n >> m;
  while (m--) {
    cnt.clear();
    cin >> k;
    flag = true;
    while (k--) {
      cin >> t;
      cnt[t] = 1;
      if (cnt[t] + cnt[-t] >= 2) flag = false;
    }
    if (flag) ok = false;
  }
  if (ok)
    cout << "NO" << endl;
  else
    cout << "YES" << endl;
  return 0;
}
