#include <bits/stdc++.h>
using namespace std;
int freq1[500005] = {0}, freq2[500005] = {0};
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n, m, ans = 0, flag = 0;
  cin >> n >> m;
  int x, y;
  for (int j = 0; j < m; j++) {
    cin >> x;
    ans = 0;
    for (int i = 0; i < x; i++) {
      cin >> y;
      if (y > 0)
        freq1[y]++;
      else
        freq2[abs(y)]++;
      if (freq1[abs(y)] >= 1 && freq2[abs(y)] >= 1) ans++;
    }
    if (ans > 0) flag++;
    for (int k = 0; k < 10005; k++) freq1[k] = 0, freq2[k] = 0;
  }
  if (flag == m)
    cout << "NO" << endl;
  else
    cout << "YES" << endl;
}
