#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  long long int n, m, k, v, i, j, f = 0, flag = 0;
  set<long long int> universe;
  map<long long int, long long int> condition;
  cin >> n >> m;
  for (long long int i = 0; i < m; i++) {
    cin >> k;
    f = 0;
    for (long long int j = 1; j <= k; j++) {
      cin >> v;
      universe.insert(v);
    }
    for (auto x : universe) condition[abs(x)]++;
    for (auto x : condition) {
      if (x.second == 2) f = 1;
    }
    if (!f) flag = 1;
    universe.clear();
    condition.clear();
  }
  if (flag)
    cout << "YES" << endl;
  else {
    cout << "NO" << endl;
  }
  return 0;
}
