#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int n, m;
  cin >> n >> m;
  bool ans = true;
  for (long long int i = 1; i <= m; i++) {
    long long int temp;
    cin >> temp;
    unordered_map<long long int, long long int> mm;
    bool cc = false;
    while (temp--) {
      long long int tt;
      cin >> tt;
      if (mm.count(-tt) != 0) {
        cc = true;
      }
      mm[tt]++;
    }
    ans = ans && cc;
  }
  if (!ans)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
}
