#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
const long long INF = 0x3f3f3f3f3f3f3f3f;
const int inf = 0x3f3f3f3f;
const int maxn = 2e4 + 7;
const int maxm = 1e6 + 7;
const double pi = acos(-1.0);
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  set<int> s;
  for (int kase = 0; kase < m; kase++) {
    int tmp, tmp1;
    cin >> tmp;
    bool flag = true;
    s.clear();
    for (int i = 0; i < tmp; i++) {
      cin >> tmp1;
      s.insert(tmp1);
      if (s.find(-tmp1) != s.end()) flag = false;
    }
    if (flag) {
      cout << "YES" << endl;
      return 0;
    }
  }
  cout << "NO" << endl;
}
