#include <bits/stdc++.h>
using namespace std;
const int Z = (int)1e5 + 111;
const int inf = (int)1e9 + 111;
const long long llinf = (long long)1e18 + 5;
int main() {
  ios_base::sync_with_stdio(false);
  map<int, int> mp;
  int n, m, k, x;
  cin >> n >> m;
  bool ok = false;
  for (int i = 0; i < m; ++i) {
    mp.clear();
    cin >> k;
    int cnt = 0;
    for (int j = 0; j < k; ++j) {
      cin >> x;
      if (mp[-x] >= 1) cnt = 1;
      mp[x]++;
    }
    if (!cnt) {
      if (!ok) cout << "YES";
      ok = true;
    }
  }
  if (!ok) cout << "NO";
  return 0;
}
