#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  cin >> n >> m;
  bool leto = 0;
  bool ans = 1;
  bool letoitog = 0;
  int g, k;
  vector<int> vec;
  for (int i = 0; i < m; ++i) {
    cin >> g;
    for (int j = 0; j < g; ++j) {
      cin >> k;
      leto = 1;
      for (int h = 0; h < vec.size(); ++h) {
        if (vec[h] == k) ans = 0;
      }
      if (ans) vec.push_back(k);
      ans = 1;
    }
    for (int j = 0; j < vec.size(); ++j)
      for (int h = 0; h < vec.size(); ++h)
        if (vec[j] == -vec[h]) leto = 0;
    if (leto == 1) letoitog = 1;
    vec.clear();
    vec.resize(0);
  }
  if (letoitog)
    cout << "YES";
  else
    cout << "NO";
  return 0;
}
