#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1);
int main() {
  ios::sync_with_stdio(0);
  cin.tie(nullptr);
  int n, m;
  cin >> n >> m;
  bool no = true;
  for (int it = 0; it < m; ++it) {
    int k;
    cin >> k;
    map<int, int> u;
    bool can = true;
    for (int i = 0; i < k; ++i) {
      int a;
      cin >> a;
      if (u[-a]) can = false;
      u[a] = 1;
    }
    if (can) no = false;
  }
  if (no) {
    cout << "NO";
  } else {
    cout << "YES";
  }
}
