#include <bits/stdc++.h>
using namespace std;
const long long logN = 20;
const long long M = 1000000007;
const long long INF = 1e18;
bool vec_compare(const vector<long long> &v1, const vector<long long> &v2) {
  return v1.size() > v2.size();
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n, m;
  cin >> n >> m;
  vector<vector<int>> V(m);
  for (int i = 0; i < m; i++) {
    int k;
    cin >> k;
    for (int j = 0; j < k; j++) {
      int x;
      cin >> x;
      V[i].push_back(x);
    }
  }
  int flag = 0;
  for (int i = 0; i < m; i++) {
    vector<int> T(n + 1, 0);
    int temp = 0;
    for (int j = 0; j < V[i].size(); j++) {
      if (V[i][j] > 0) {
        if (T[V[i][j]] == -1) {
          temp++;
          break;
        } else
          T[V[i][j]] = 1;
      } else {
        if (T[-1 * V[i][j]] == 1) {
          temp++;
          break;
        } else
          T[-1 * V[i][j]] = -1;
      }
    }
    if (!temp) {
      flag++;
      break;
    }
  }
  if (flag) {
    cout << "YES" << endl;
  } else {
    cout << "NO" << endl;
  }
  return 0;
}
