#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int n, m;
  cin >> n >> m;
  int i, j, k, flag, res, x;
  res = 0;
  for (i = 0; i < m; i++) {
    cin >> k;
    flag = 0;
    vector<int> rick(n + 1);
    vector<int> mort(n + 1);
    for (j = 0; j < k; j++) {
      cin >> x;
      if (x < 0) {
        x = -x;
        rick[x] = 1;
      } else
        mort[x] = 1;
      if (mort[x] == 1 && rick[x] == 1) flag = 1;
    }
    if (flag == 0) res = 1;
  }
  if (res == 1)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
  return 0;
}
