#include <bits/stdc++.h>
int N, M;
std::pair<int, int> *mem;
int main() {
  std::cin >> N >> M;
  mem = new std::pair<int, int>[N];
  for (int i = 0; i < M; i++) {
    for (int i = 0; i < N; i++) mem[i] = {0, 0};
    int id, sz;
    std::cin >> sz;
    for (int j = 0; j < sz; j++) {
      std::cin >> id;
      bool pos = id > 0;
      id = std::abs(id) - 1;
      if (pos)
        mem[id].first = 1;
      else
        mem[id].second = 1;
    }
    bool trait = true;
    for (int j = 0; j < N; j++)
      if (mem[j].first && mem[j].second) {
        trait = false;
        break;
      }
    if (trait) {
      std::cout << "YES\n";
      return 0;
    }
  }
  std::cout << "NO\n";
  return 0;
}
