#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, pom;
  cin >> n >> m;
  vector<vector<int> > plus(m);
  vector<vector<int> > minus(m);
  for (int i = 0; i < m; i++) {
    cin >> n;
    for (int j = 0; j < n; j++) {
      cin >> pom;
      if (pom > 0)
        plus[i].push_back(pom);
      else
        minus[i].push_back(pom);
    }
  }
  int i;
  for (i = 0; i < m; i++) {
    bool final = true;
    for (auto el : minus[i]) {
      auto res = find(plus[i].begin(), plus[i].end(), -1 * el);
      if (res != plus[i].end()) {
        final = false;
        break;
      }
    }
    if (final) break;
  }
  if (i == m)
    cout << "NO" << endl;
  else
    cout << "YES" << endl;
  return 0;
}
