#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  int a, b;
  cin >> a >> b;
  for (int i = 0; i < b; i++) {
    int q[10010] = {0};
    int vis[20020] = {0};
    int c;
    cin >> c;
    int m;
    for (int j = 0; j < c; j++) {
      cin >> m;
      if (m > 0 && vis[10010 + m] == 0) {
        q[m] += 1;
        vis[10010 + m] = 1;
      }
      if (m < 0 && vis[10010 + m] == 0) {
        q[-m] += 1;
        vis[10010 + m] = 1;
      }
    }
    bool y = true;
    for (int j = 0; j <= a; j++) {
      if (q[j] == 2) {
        y = false;
        break;
      }
    }
    if (y == true) {
      cout << "YES" << endl;
      return 0;
    }
  }
  cout << "NO" << endl;
  return 0;
}
