#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
const int inf = 0x3f3f3f3f;
const double eps = 1e-7;
map<int, int> mm;
int main() {
  ios::sync_with_stdio(false);
  int n, m;
  cin >> n >> m;
  int fg = 0;
  while (m--) {
    int k;
    cin >> k;
    mm.clear();
    int flag = 0;
    while (k--) {
      int v;
      cin >> v;
      mm[v] = 1;
      if (mm[-v]) flag = 1;
    }
    if (!flag) fg = 1;
  }
  if (fg)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
  return 0;
}
