#include <bits/stdc++.h>
using namespace ::std;
bool F[100005], F1[100005], F2[100005];
vector<int> A, PO, NE;
int main(void) {
  int n, m, k, aux, l;
  bool f = true, f2;
  cin >> n >> m;
  for (int i = 0; i < m && f; i++) {
    l = 0;
    f2 = true;
    memset(F, false, sizeof F);
    memset(F1, false, sizeof F1);
    memset(F2, false, sizeof F2);
    cin >> k;
    for (int j = 0; j < k; j++) {
      cin >> aux;
      if (aux > 0) {
        if (!F1[aux]) {
          F1[aux] = true;
          A.push_back(aux);
          l++;
        }
      } else {
        if (!F2[abs(aux)]) {
          F2[abs(aux)] = true;
          A.push_back(aux);
          l++;
        }
      }
    }
    for (int j = 0; j < l && f2; j++) {
      if (!F[abs(A[j])])
        F[abs(A[j])] = true;
      else
        f2 = false;
    }
    if (f2) f = false;
    A.clear();
  }
  if (!f)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
  return 0;
}
