#include <bits/stdc++.h>
using namespace ::std;
const long double PI = acos(-1);
const long double e = 2.7182818284590452353602874713527L;
const long double gold = 1.6180339887498948482045868343656L;
long long n, m;
long long a, b, x, q;
string s;
map<long long, bool> ma;
vector<int> v;
int main() {
  cin >> n >> m;
  bool stop = false;
  bool can;
  for (int i = 0; i < m; i++) {
    can = true;
    v.clear();
    ma.clear();
    cin >> q;
    for (int i = 0; i < q; i++) {
      cin >> x;
      v.push_back(x);
      ma[x] = true;
    }
    for (int i = 0; i < q && can; i++) {
      x = v[i];
      if (ma[x] && ma[-x]) {
        can = false;
      }
    }
    stop = stop || can;
  }
  if (stop)
    puts("YES");
  else
    puts("NO");
  return 0;
}
