#include <bits/stdc++.h>
using namespace std;
int A[10010];
int main() {
  set<int> st;
  int n, m;
  cin >> n >> m;
  int mark = 0;
  for (int i = 0; i < m; i++) {
    int a;
    cin >> a;
    st.clear();
    int cur = 0;
    for (int j = 0; j < a; j++) {
      int x;
      cin >> x;
      if (st.find(-1 * x) != st.end()) {
        cur = 1;
        continue;
      } else
        st.insert(x);
      if (j == a - 1 && !cur) mark = 1;
    }
  }
  if (mark)
    cout << "YES\n";
  else
    cout << "NO";
}
