#include <bits/stdc++.h>
using namespace std;
int n, m, k;
int state[10010];
int iabs(int x) {
  if (x > 0)
    return x;
  else
    return -x;
}
int main() {
  cin >> n >> m;
  int result2 = 1;
  for (int i = 0; i < m; i++) {
    fill(state, state + 10010, 0);
    cin >> k;
    int result = 0;
    for (int j = 0; j < k; j++) {
      int y;
      cin >> y;
      if (y > 0 && state[y] == 0)
        state[y] = 1;
      else if (y < 0 && state[-y] == 0)
        state[-y] = -1;
      else if (y > 0 && state[y] == -1)
        result = 1;
      else if (y < 0 && state[-y] == 1)
        result = 1;
    }
    if (result == 0) {
      result2 = 0;
    }
  }
  if (result2 == 0) {
    cout << "YES" << endl;
  } else
    cout << "NO" << endl;
  return 0;
}
