#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e4 + 4;
int groups;
map<int, int> mp;
int main() {
  int n, m, k;
  cin >> n >> m;
  int temp;
  int flg1 = 0, flg = 0;
  for (int i = 0; i < m; i++) {
    cin >> k;
    mp.clear();
    for (int j = 0; j < k; j++) {
      cin >> temp;
      if (mp.find(-temp) == mp.end()) {
        mp[temp] = 1;
      } else {
        flg1 = 1;
      }
    }
    if (!flg1) flg = 1;
    flg1 = 0;
  }
  if (flg)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
  return 0;
}
