QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#434588#8782. Schoolgirlsucup-team987#AC ✓35ms4756kbC++2317.6kb2024-06-08 16:42:132024-06-08 16:42:14

Judging History

你现在查看的是测评时间为 2024-06-08 16:42:14 的历史记录

  • [2024-10-14 08:09:13]
  • 管理员手动重测该提交记录
  • 测评结果:AC
  • 用时:34ms
  • 内存:4792kb
  • [2024-06-14 13:48:47]
  • hack成功,自动添加数据
  • (/hack/679)
  • [2024-06-14 13:05:18]
  • hack成功,自动添加数据
  • (/hack/678)
  • [2024-06-14 12:22:35]
  • hack成功,自动添加数据
  • (/hack/676)
  • [2024-06-08 16:42:14]
  • 评测
  • 测评结果:100
  • 用时:35ms
  • 内存:4756kb
  • [2024-06-08 16:42:13]
  • 提交

answer

#if __INCLUDE_LEVEL__ == 0

#include __BASE_FILE__

namespace {

using Mint = atcoder::modint;

void solve() {
  Int n, m, q;
  scan(n, m, q);
  Vec<Arr<Int, 3>> abc(m);
  for ([a, b, c] : abc) {
    scan(a, b, c);
    --a, --b, --c;
  }
  Vec<Vec<Int>> queries(q);
  for (query : queries) {
    Int r;
    scan(r);
    query.resize(r);
    scan(query);
    --query;
  }
  Vec<bool> ans(q, true);
  Int P = Int(2e9) / n * n + 1;
  for (_ : rep(10)) {
    P -= n;
    while (!atcoder::internal::is_prime_constexpr(P)) {
      P -= n;
    }
    Mint::set_mod(P);
    Vec<Mint> K(n + m);
    {
      Mint r = atcoder::internal::primitive_root_constexpr(P);
      r = r.pow((P - 1) / n);
      K[0] = 1;
      for (i : rep(1, n)) {
        K[i] = K[i - 1] * r;
      }
    }
    for (i : rep(n, n + m)) {
      auto [a, b, c] = abc[i - n];
      K[i] = K[a] - K[b] + K[c];
    }
    for (qi : rep(q)) {
      auto& query = queries[qi];
      Int r = len(query);
      ranges::sort(query, {}, $(K[$1].val()));
      Int eq = 0;
      for (i : rep(r - 1)) {
        if (K[query[i]] == K[query[i + 1]]) {
          ++eq;
        }
      }
      if (eq && eq != r - 1) {
        ans[qi] = false;
        continue;
      }
      if (!ans[qi]) {
        continue;
      }
      Mint c = 0;
      for (i : query) {
        c += K[i];
      }
      c /= r;
      Mint t = (K[query[0]] - c).pow(r);
      for (i : query) {
        if ((K[i] - c).pow(r) != t) {
          ans[qi] = false;
          break;
        }
      }
    }
  }
  for (e : ans) {
    print(e ? "Yes" : "No");
  }
}

}  // namespace

int main() {
  std::ios::sync_with_stdio(false);
  std::cin.tie(nullptr);
  std::cout << std::setprecision(std::numeric_limits<Float>::max_digits10);

  solve();
}

#else  // __INCLUDE_LEVEL__

#include <bits/stdc++.h>

namespace atcoder {

namespace internal {

constexpr long long safe_mod(long long x, long long m) {
  x %= m;
  if (x < 0) x += m;
  return x;
}

struct barrett {
  unsigned int _m;
  unsigned long long im;

  explicit barrett(unsigned int m)
      : _m(m), im((unsigned long long)(-1) / m + 1) {}

  unsigned int umod() const { return _m; }

  unsigned int mul(unsigned int a, unsigned int b) const {
    unsigned long long z = a;
    z *= b;
    unsigned long long x =
        (unsigned long long)(((unsigned __int128)(z)*im) >> 64);
    unsigned long long y = x * _m;
    return (unsigned int)(z - y + (z < y ? _m : 0));
  }
};

constexpr long long pow_mod_constexpr(long long x, long long n, int m) {
  if (m == 1) return 0;
  unsigned int _m = (unsigned int)(m);
  unsigned long long r = 1;
  unsigned long long y = safe_mod(x, m);
  while (n) {
    if (n & 1) r = (r * y) % _m;
    y = (y * y) % _m;
    n >>= 1;
  }
  return r;
}

constexpr bool is_prime_constexpr(int n) {
  if (n <= 1) return false;
  if (n == 2 || n == 7 || n == 61) return true;
  if (n % 2 == 0) return false;
  long long d = n - 1;
  while (d % 2 == 0) d /= 2;
  constexpr long long bases[3] = {2, 7, 61};
  for (long long a : bases) {
    long long t = d;
    long long y = pow_mod_constexpr(a, t, n);
    while (t != n - 1 && y != 1 && y != n - 1) {
      y = y * y % n;
      t <<= 1;
    }
    if (y != n - 1 && t % 2 == 0) {
      return false;
    }
  }
  return true;
}
template <int n>
constexpr bool is_prime = is_prime_constexpr(n);

constexpr std::pair<long long, long long> inv_gcd(long long a, long long b) {
  a = safe_mod(a, b);
  if (a == 0) return {b, 0};

  long long s = b, t = a;
  long long m0 = 0, m1 = 1;

  while (t) {
    long long u = s / t;
    s -= t * u;
    m0 -= m1 * u;

    auto tmp = s;
    s = t;
    t = tmp;
    tmp = m0;
    m0 = m1;
    m1 = tmp;
  }
  if (m0 < 0) m0 += b / s;
  return {s, m0};
}

constexpr int primitive_root_constexpr(int m) {
  if (m == 2) return 1;
  if (m == 167772161) return 3;
  if (m == 469762049) return 3;
  if (m == 754974721) return 11;
  if (m == 998244353) return 3;
  int divs[20] = {};
  divs[0] = 2;
  int cnt = 1;
  int x = (m - 1) / 2;
  while (x % 2 == 0) x /= 2;
  for (int i = 3; (long long)(i)*i <= x; i += 2) {
    if (x % i == 0) {
      divs[cnt++] = i;
      while (x % i == 0) {
        x /= i;
      }
    }
  }
  if (x > 1) {
    divs[cnt++] = x;
  }
  for (int g = 2;; g++) {
    bool ok = true;
    for (int i = 0; i < cnt; i++) {
      if (pow_mod_constexpr(g, (m - 1) / divs[i], m) == 1) {
        ok = false;
        break;
      }
    }
    if (ok) return g;
  }
}
template <int m>
constexpr int primitive_root = primitive_root_constexpr(m);

unsigned long long floor_sum_unsigned(unsigned long long n,
                                      unsigned long long m,
                                      unsigned long long a,
                                      unsigned long long b) {
  unsigned long long ans = 0;
  while (true) {
    if (a >= m) {
      ans += n * (n - 1) / 2 * (a / m);
      a %= m;
    }
    if (b >= m) {
      ans += n * (b / m);
      b %= m;
    }

    unsigned long long y_max = a * n + b;
    if (y_max < m) break;
    n = (unsigned long long)(y_max / m);
    b = (unsigned long long)(y_max % m);
    std::swap(m, a);
  }
  return ans;
}

}  // namespace internal

}  // namespace atcoder

namespace atcoder {

namespace internal {

template <class T>
using is_signed_int128 =
    typename std::conditional<std::is_same<T, __int128_t>::value ||
                                  std::is_same<T, __int128>::value,
                              std::true_type, std::false_type>::type;

template <class T>
using is_unsigned_int128 =
    typename std::conditional<std::is_same<T, __uint128_t>::value ||
                                  std::is_same<T, unsigned __int128>::value,
                              std::true_type, std::false_type>::type;

template <class T>
using make_unsigned_int128 =
    typename std::conditional<std::is_same<T, __int128_t>::value, __uint128_t,
                              unsigned __int128>;

template <class T>
using is_integral =
    typename std::conditional<std::is_integral<T>::value ||
                                  is_signed_int128<T>::value ||
                                  is_unsigned_int128<T>::value,
                              std::true_type, std::false_type>::type;

template <class T>
using is_signed_int =
    typename std::conditional<(is_integral<T>::value &&
                               std::is_signed<T>::value) ||
                                  is_signed_int128<T>::value,
                              std::true_type, std::false_type>::type;

template <class T>
using is_unsigned_int =
    typename std::conditional<(is_integral<T>::value &&
                               std::is_unsigned<T>::value) ||
                                  is_unsigned_int128<T>::value,
                              std::true_type, std::false_type>::type;

template <class T>
using to_unsigned = typename std::conditional<
    is_signed_int128<T>::value, make_unsigned_int128<T>,
    typename std::conditional<std::is_signed<T>::value, std::make_unsigned<T>,
                              std::common_type<T>>::type>::type;

template <class T>
using is_signed_int_t = std::enable_if_t<is_signed_int<T>::value>;

template <class T>
using is_unsigned_int_t = std::enable_if_t<is_unsigned_int<T>::value>;

template <class T>
using to_unsigned_t = typename to_unsigned<T>::type;

}  // namespace internal

}  // namespace atcoder

namespace atcoder {

namespace internal {

struct modint_base {};
struct static_modint_base : modint_base {};

template <class T>
using is_modint = std::is_base_of<modint_base, T>;
template <class T>
using is_modint_t = std::enable_if_t<is_modint<T>::value>;

}  // namespace internal

template <int m, std::enable_if_t<(1 <= m)>* = nullptr>
struct static_modint : internal::static_modint_base {
  using mint = static_modint;

 public:
  static constexpr int mod() { return m; }
  static mint raw(int v) {
    mint x;
    x._v = v;
    return x;
  }

  static_modint() : _v(0) {}
  template <class T, internal::is_signed_int_t<T>* = nullptr>
  static_modint(T v) {
    long long x = (long long)(v % (long long)(umod()));
    if (x < 0) x += umod();
    _v = (unsigned int)(x);
  }
  template <class T, internal::is_unsigned_int_t<T>* = nullptr>
  static_modint(T v) {
    _v = (unsigned int)(v % umod());
  }

  unsigned int val() const { return _v; }

  mint& operator++() {
    _v++;
    if (_v == umod()) _v = 0;
    return *this;
  }
  mint& operator--() {
    if (_v == 0) _v = umod();
    _v--;
    return *this;
  }
  mint operator++(int) {
    mint result = *this;
    ++*this;
    return result;
  }
  mint operator--(int) {
    mint result = *this;
    --*this;
    return result;
  }

  mint& operator+=(const mint& rhs) {
    _v += rhs._v;
    if (_v >= umod()) _v -= umod();
    return *this;
  }
  mint& operator-=(const mint& rhs) {
    _v -= rhs._v;
    if (_v >= umod()) _v += umod();
    return *this;
  }
  mint& operator*=(const mint& rhs) {
    unsigned long long z = _v;
    z *= rhs._v;
    _v = (unsigned int)(z % umod());
    return *this;
  }
  mint& operator/=(const mint& rhs) { return *this = *this * rhs.inv(); }

  mint operator+() const { return *this; }
  mint operator-() const { return mint() - *this; }

  mint pow(long long n) const {
    assert(0 <= n);
    mint x = *this, r = 1;
    while (n) {
      if (n & 1) r *= x;
      x *= x;
      n >>= 1;
    }
    return r;
  }
  mint inv() const {
    if (prime) {
      assert(_v);
      return pow(umod() - 2);
    } else {
      auto eg = internal::inv_gcd(_v, m);
      assert(eg.first == 1);
      return eg.second;
    }
  }

  friend mint operator+(const mint& lhs, const mint& rhs) {
    return mint(lhs) += rhs;
  }
  friend mint operator-(const mint& lhs, const mint& rhs) {
    return mint(lhs) -= rhs;
  }
  friend mint operator*(const mint& lhs, const mint& rhs) {
    return mint(lhs) *= rhs;
  }
  friend mint operator/(const mint& lhs, const mint& rhs) {
    return mint(lhs) /= rhs;
  }
  friend bool operator==(const mint& lhs, const mint& rhs) {
    return lhs._v == rhs._v;
  }
  friend bool operator!=(const mint& lhs, const mint& rhs) {
    return lhs._v != rhs._v;
  }

 private:
  unsigned int _v;
  static constexpr unsigned int umod() { return m; }
  static constexpr bool prime = internal::is_prime<m>;
};

template <int id>
struct dynamic_modint : internal::modint_base {
  using mint = dynamic_modint;

 public:
  static int mod() { return (int)(bt.umod()); }
  static void set_mod(int m) {
    assert(1 <= m);
    bt = internal::barrett(m);
  }
  static mint raw(int v) {
    mint x;
    x._v = v;
    return x;
  }

  dynamic_modint() : _v(0) {}
  template <class T, internal::is_signed_int_t<T>* = nullptr>
  dynamic_modint(T v) {
    long long x = (long long)(v % (long long)(mod()));
    if (x < 0) x += mod();
    _v = (unsigned int)(x);
  }
  template <class T, internal::is_unsigned_int_t<T>* = nullptr>
  dynamic_modint(T v) {
    _v = (unsigned int)(v % mod());
  }

  unsigned int val() const { return _v; }

  mint& operator++() {
    _v++;
    if (_v == umod()) _v = 0;
    return *this;
  }
  mint& operator--() {
    if (_v == 0) _v = umod();
    _v--;
    return *this;
  }
  mint operator++(int) {
    mint result = *this;
    ++*this;
    return result;
  }
  mint operator--(int) {
    mint result = *this;
    --*this;
    return result;
  }

  mint& operator+=(const mint& rhs) {
    _v += rhs._v;
    if (_v >= umod()) _v -= umod();
    return *this;
  }
  mint& operator-=(const mint& rhs) {
    _v += mod() - rhs._v;
    if (_v >= umod()) _v -= umod();
    return *this;
  }
  mint& operator*=(const mint& rhs) {
    _v = bt.mul(_v, rhs._v);
    return *this;
  }
  mint& operator/=(const mint& rhs) { return *this = *this * rhs.inv(); }

  mint operator+() const { return *this; }
  mint operator-() const { return mint() - *this; }

  mint pow(long long n) const {
    assert(0 <= n);
    mint x = *this, r = 1;
    while (n) {
      if (n & 1) r *= x;
      x *= x;
      n >>= 1;
    }
    return r;
  }
  mint inv() const {
    auto eg = internal::inv_gcd(_v, mod());
    assert(eg.first == 1);
    return eg.second;
  }

  friend mint operator+(const mint& lhs, const mint& rhs) {
    return mint(lhs) += rhs;
  }
  friend mint operator-(const mint& lhs, const mint& rhs) {
    return mint(lhs) -= rhs;
  }
  friend mint operator*(const mint& lhs, const mint& rhs) {
    return mint(lhs) *= rhs;
  }
  friend mint operator/(const mint& lhs, const mint& rhs) {
    return mint(lhs) /= rhs;
  }
  friend bool operator==(const mint& lhs, const mint& rhs) {
    return lhs._v == rhs._v;
  }
  friend bool operator!=(const mint& lhs, const mint& rhs) {
    return lhs._v != rhs._v;
  }

 private:
  unsigned int _v;
  static internal::barrett bt;
  static unsigned int umod() { return bt.umod(); }
};
template <int id>
internal::barrett dynamic_modint<id>::bt(998244353);

using modint998244353 = static_modint<998244353>;
using modint1000000007 = static_modint<1000000007>;
using modint = dynamic_modint<-1>;

namespace internal {

template <class T>
using is_static_modint = std::is_base_of<internal::static_modint_base, T>;

template <class T>
using is_static_modint_t = std::enable_if_t<is_static_modint<T>::value>;

template <class>
struct is_dynamic_modint : public std::false_type {};
template <int id>
struct is_dynamic_modint<dynamic_modint<id>> : public std::true_type {};

template <class T>
using is_dynamic_modint_t = std::enable_if_t<is_dynamic_modint<T>::value>;

}  // namespace internal

}  // namespace atcoder

using i8 = int8_t;
using i16 = int16_t;
using i32 = int32_t;
using i64 = int64_t;
using i128 = __int128_t;
using u8 = uint8_t;
using u16 = uint16_t;
using u32 = uint32_t;
using u64 = uint64_t;
using u128 = __uint128_t;

using Int = int64_t;
using Float = double;
using Str = std::string;

template <class T1, class T2>
using Pair = std::pair<T1, T2>;

template <class... Ts>
using Tuple = std::tuple<Ts...>;

template <class T, size_t N>
using Arr = std::array<T, N>;

template <class T>
using Vec = std::vector<T>;

template <class T>
using Set = std::set<T>;

template <class T>
using Multiset = std::multiset<T>;

template <class K, class T>
using Map = std::map<K, T>;

template <class T>
using MinHeap = std::priority_queue<T, Vec<T>, std::greater<T>>;

template <class T>
using MaxHeap = std::priority_queue<T>;

namespace ranges = std::ranges;
namespace views = std::views;

inline constexpr auto len = ranges::ssize;
inline constexpr auto rev = views::reverse;

constexpr auto rep(Int l, Int r) { return views::iota(std::min(l, r), r); }
constexpr auto rep(Int n) { return rep(0, n); }
constexpr auto rep1(Int l, Int r) { return rep(l, r + 1); }
constexpr auto rep1(Int n) { return rep(1, n + 1); }

template <class T, class U = T>
bool chmin(T& x, U&& y) {
  return y < x && (x = std::forward<U>(y), true);
}

template <class T, class U = T>
bool chmax(T& x, U&& y) {
  return x < y && (x = std::forward<U>(y), true);
}

template <std::signed_integral T = Int>
T inf() {
  T ret;
  std::memset(&ret, 0x3f, sizeof(ret));
  return ret;
}

template <std::floating_point T>
T inf() {
  return std::numeric_limits<T>::infinity();
}

template <class T>
concept Range = ranges::range<T> && !std::convertible_to<T, std::string_view>;

template <class T>
concept TupleLike = std::__is_tuple_like<T>::value && !Range<T>;

namespace std {

istream& operator>>(istream& is, Range auto&& r) {
  for (auto&& e : r) {
    is >> e;
  }
  return is;
}

istream& operator>>(istream& is, TupleLike auto&& t) {
  return apply([&](auto&... xs) -> istream& { return (is >> ... >> xs); }, t);
}

ostream& operator<<(ostream& os, Range auto&& r) {
  for (string_view sep = ""; auto&& e : r) {
    os << exchange(sep, " ") << e;
  }
  return os;
}

ostream& operator<<(ostream& os, TupleLike auto&& t) {
  const auto f = [&](auto&... xs) -> ostream& {
    [[maybe_unused]] string_view sep = "";
    ((os << exchange(sep, " ") << xs), ...);
    return os;
  };
  return apply(f, t);
}

template <class T, atcoder::internal::is_modint_t<T>* = nullptr>
istream& operator>>(istream& is, T& x) {
  int v;
  is >> v;
  x = T::raw(v);
  return is;
}

template <class T, atcoder::internal::is_modint_t<T>* = nullptr>
ostream& operator<<(ostream& os, const T& x) {
  return os << x.val();
}

}  // namespace std

#define DEF_INC_OR_DEC(op) \
  auto& operator op(Range auto&& r) { \
    for (auto&& e : r) { \
      op e; \
    } \
    return r; \
  } \
  auto& operator op(TupleLike auto&& t) { \
    std::apply([](auto&... xs) { (op xs, ...); }, t); \
    return t; \
  }

DEF_INC_OR_DEC(++)
DEF_INC_OR_DEC(--)

#undef DEF_INC_OR_DEC

void scan(auto&&... xs) { std::cin >> std::tie(xs...); }
void print(auto&&... xs) { std::cout << std::tie(xs...) << '\n'; }

#define $(...) \
  [&]<class T1 = int, class T2 = int>([[maybe_unused]] T1&& $1 = 0, \
                                      [[maybe_unused]] T2&& $2 = 0) \
      ->decltype(auto) { \
    return __VA_ARGS__; \
  }

template <class F>
class fix {
 public:
  explicit fix(F f) : f_(std::move(f)) {}

  decltype(auto) operator()(auto&&... xs) const {
    return f_(std::ref(*this), std::forward<decltype(xs)>(xs)...);
  }

 private:
  F f_;
};

#define for(...) for ([[maybe_unused]] auto&& __VA_ARGS__)

#endif  // __INCLUDE_LEVEL__

詳細信息

Test #1:

score: 100
Accepted
time: 1ms
memory: 3532kb

input:

3 6 8
1 2 3
3 1 4
5 4 3
3 1 2
4 5 3
4 5 2
6 4 7 6 5 1 2
3 1 3 2
3 1 1 8
4 2 5 6 7
3 2 1 4
3 6 5 9
3 4 7 9
4 1 3 2 8

output:

Yes
Yes
Yes
No
No
No
Yes
No

result:

ok 8 token(s): yes count is 4, no count is 4

Test #2:

score: 0
Accepted
time: 1ms
memory: 3816kb

input:

12 0 1
12 12 11 10 9 8 7 6 5 4 3 2 1

output:

Yes

result:

ok YES

Test #3:

score: 0
Accepted
time: 4ms
memory: 3924kb

input:

3 0 6685
5 1 3 1 2 2
3 1 2 3
5 3 1 3 3 1
4 1 1 1 3
3 3 2 1
5 2 3 2 1 3
6 2 2 3 2 3 1
5 3 1 2 3 2
3 3 3 2
5 3 2 2 2 3
5 2 2 3 3 1
6 3 3 1 3 1 3
6 2 3 3 2 2 1
5 2 2 3 2 2
6 2 3 3 2 1 3
6 2 2 2 2 1 3
3 3 1 2
4 3 2 1 1
5 3 1 3 2 3
4 3 1 1 2
4 2 2 2 3
3 1 2 2
4 2 3 3 1
3 2 2 2
4 1 2 2 3
3 3 3 3
4 1 3 1 3...

output:

No
Yes
No
No
Yes
No
No
No
No
No
No
No
No
No
No
No
Yes
No
No
No
No
No
No
Yes
No
Yes
No
No
No
No
No
No
No
No
No
No
No
No
Yes
No
No
No
No
No
No
No
No
Yes
No
No
No
No
No
Yes
No
Yes
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
Yes
No
No
No
No
No
No
No
No
No
No
No
No
Yes
No
No
No
No
No
N...

result:

ok 6685 token(s): yes count is 680, no count is 6005

Test #4:

score: 0
Accepted
time: 4ms
memory: 4164kb

input:

3 1 6654
3 3 1
5 1 2 2 3 3
4 2 1 4 2
4 3 3 2 1
5 4 1 2 1 4
3 1 4 4
6 3 1 2 1 1 4
4 1 2 1 2
5 1 4 3 4 4
4 2 4 4 1
6 3 2 4 2 4 3
3 1 2 1
3 3 2 4
5 4 3 2 1 2
4 3 2 2 1
4 2 1 4 2
4 4 4 2 1
6 2 1 4 2 2 3
4 4 1 2 1
5 2 2 3 3 3
4 2 2 1 4
3 4 3 1
6 4 2 2 4 2 2
6 1 4 1 1 2 2
5 1 4 1 4 3
6 3 2 1 4 1 2
5 2 4 3...

output:

No
No
No
No
Yes
No
No
No
No
No
No
Yes
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
Yes
No
No
No
No
No
No
No
No
No
No
Yes
No
No
No
Yes
Yes
No
No
No
No
Yes
No
No
No
No
No
No
No
No
No
No
No
No
No
Yes
No
No
No
No
No
Yes
No
Yes
No
Yes
No
Yes
Yes
No
No
Yes
No
Yes
...

result:

ok 6654 token(s): yes count is 768, no count is 5886

Test #5:

score: 0
Accepted
time: 5ms
memory: 3968kb

input:

3 3 6656
2 3 2
1 2 1
2 3 4
5 3 1 2 3 5
5 3 2 2 2 2
6 5 3 1 4 1 1
5 3 1 5 5 4
3 1 3 6
6 6 3 3 1 4 6
4 2 2 3 1
3 6 4 3
3 5 1 4
3 4 1 5
4 4 2 4 5
3 4 3 5
3 6 4 6
4 3 1 6 5
6 1 1 3 6 1 1
3 4 6 3
6 3 2 2 4 1 6
5 6 2 3 2 1
3 5 3 3
6 1 3 1 2 1 6
4 3 1 3 2
4 4 5 6 3
6 5 6 3 1 4 3
6 5 1 2 4 3 6
3 4 3 5
3 5 4...

output:

No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
...

result:

ok 6656 token(s): yes count is 100, no count is 6556

Test #6:

score: 0
Accepted
time: 4ms
memory: 3908kb

input:

3 7 6638
1 2 1
3 1 2
4 3 2
6 1 5
3 1 5
5 2 1
7 3 8
5 7 2 9 10 7
5 1 4 1 4 6
3 5 4 1
3 1 2 8
4 9 8 1 7
4 4 4 2 7
4 2 2 3 9
4 2 5 6 9
4 5 3 3 1
3 1 3 4
4 2 8 4 5
3 9 6 10
6 2 8 4 4 6 7
3 5 3 6
3 5 8 6
4 3 2 2 1
4 9 2 5 2
6 9 6 5 4 8 9
6 9 7 5 9 5 3
3 5 6 2
6 8 4 3 8 1 8
4 7 8 8 7
4 10 3 5 10
6 7 7 2 1...

output:

No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
Yes
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
Yes
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
N...

result:

ok 6638 token(s): yes count is 144, no count is 6494

Test #7:

score: 0
Accepted
time: 5ms
memory: 4084kb

input:

3 15 6655
2 3 1
3 4 1
2 3 4
6 2 3
6 1 2
4 1 6
8 8 1
1 5 4
4 9 6
6 1 5
12 11 7
12 3 12
8 10 1
7 10 4
10 17 12
4 12 8 10 4
6 14 16 15 9 1 12
5 10 16 18 3 10
6 2 11 9 11 2 2
4 1 8 1 13
4 12 13 12 7
5 16 12 5 18 8
5 14 13 13 12 3
5 3 6 18 5 16
4 1 16 17 16
3 10 10 10
6 17 8 16 14 11 14
3 5 3 13
3 13 9 1...

output:

No
No
No
No
No
No
No
No
No
No
Yes
No
No
No
No
No
No
No
No
No
No
No
No
No
No
Yes
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
Yes
No
No
Yes
No
No
No
No
No
No
No
No
No
Yes
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
N...

result:

ok 6655 token(s): yes count is 92, no count is 6563

Test #8:

score: 0
Accepted
time: 11ms
memory: 4520kb

input:

3 30000 6650
1 2 1
4 3 4
3 5 5
3 2 3
6 4 7
2 1 6
7 8 1
5 3 6
1 2 10
11 1 1
8 6 12
7 1 3
11 13 12
7 6 15
10 7 13
1 6 7
13 1 1
19 3 18
4 21 15
3 18 22
19 16 18
16 24 18
19 20 7
21 9 17
27 20 3
21 13 7
22 1 27
2 11 20
31 28 4
15 29 2
22 1 12
19 29 9
6 28 30
23 18 27
2 2 5
37 10 20
25 4 27
32 29 33
41 3...

output:

No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
...

result:

ok 6650 token(s): yes count is 0, no count is 6650

Test #9:

score: 0
Accepted
time: 4ms
memory: 3916kb

input:

4 0 5533
3 3 3 2
8 2 3 1 3 4 1 3 4
8 4 2 3 4 3 4 3 2
7 4 4 4 4 4 1 2
5 1 1 4 1 2
3 3 2 1
5 2 1 1 1 2
6 2 3 2 3 4 4
6 4 4 3 2 3 1
4 2 2 1 1
5 2 1 4 1 4
3 4 1 2
3 2 3 3
5 4 2 3 2 1
8 4 2 1 3 2 1 3 4
4 2 2 4 4
4 1 2 3 2
3 3 3 4
7 3 3 2 4 1 3 2
3 2 1 3
6 2 1 2 1 1 2
4 3 4 2 1
6 2 2 1 2 3 4
8 4 4 4 1 2 1...

output:

No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
Yes
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
Yes
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
Yes
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
...

result:

ok 5533 token(s): yes count is 162, no count is 5371

Test #10:

score: 0
Accepted
time: 4ms
memory: 4020kb

input:

4 1 5458
3 4 4
8 5 3 3 1 4 3 2 4
3 4 2 5
4 2 2 4 1
4 1 1 5 4
5 2 5 5 5 3
4 4 2 4 1
4 5 5 1 4
6 2 5 1 3 2 2
5 3 2 2 1 4
5 1 2 5 2 3
3 1 5 3
5 5 1 5 1 2
4 3 2 1 3
4 2 5 1 2
3 3 2 5
5 3 3 1 1 4
3 3 5 4
4 5 1 2 5
8 5 3 4 5 5 1 3 5
3 5 5 4
8 5 5 2 3 5 1 2 3
4 3 2 2 3
8 1 4 2 5 5 3 1 3
6 2 2 5 4 5 3
8 5 5...

output:

No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
Yes
No
No
Yes
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
Yes
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
...

result:

ok 5458 token(s): yes count is 194, no count is 5264

Test #11:

score: 0
Accepted
time: 4ms
memory: 3920kb

input:

4 3 5462
3 4 2
3 4 2
3 4 2
7 7 3 3 7 5 2 1
6 4 1 5 3 2 4
8 5 2 3 7 4 3 6 7
4 1 4 6 5
8 3 2 6 1 7 6 1 3
4 7 5 3 4
6 7 1 7 1 2 3
8 6 2 7 7 7 2 3 3
7 2 3 7 6 3 5 7
5 2 4 5 4 3
5 7 2 2 2 1
5 4 5 5 3 1
3 1 6 3
7 7 5 4 2 6 5 1
6 6 2 4 1 6 1
3 4 3 5
4 3 5 2 7
7 4 4 7 3 7 7 1
5 7 5 3 6 6
4 7 5 3 4
6 1 3 1 6...

output:

No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
Yes
No
No
No
No
No
No
Yes
No
No
No
No
No
No
No
No
No
Yes
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
...

result:

ok 5462 token(s): yes count is 149, no count is 5313

Test #12:

score: 0
Accepted
time: 4ms
memory: 3920kb

input:

4 7 5463
4 2 1
1 3 1
5 5 2
2 1 1
3 2 2
4 1 7
10 9 7
6 2 11 2 10 6 1
4 11 4 4 3
3 5 5 3
4 7 7 10 8
5 9 7 11 9 5
4 11 8 1 6
5 5 9 1 6 6
5 2 11 7 8 1
3 5 8 8
7 9 6 10 9 10 3 3
6 5 1 9 6 3 7
4 5 1 7 9
5 8 9 6 11 2
3 6 6 3
3 11 8 3
4 7 2 6 4
7 4 5 8 6 11 10 3
5 11 1 4 8 10
6 1 3 10 4 6 3
8 9 5 11 2 11 1 ...

output:

No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
Yes
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
Yes
No
No
No
No
No
No
No
No
No
No
No
No
No
Yes
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
Yes
No
No
No
No
No
No
No
No
No
No
No
No...

result:

ok 5463 token(s): yes count is 108, no count is 5355

Test #13:

score: 0
Accepted
time: 5ms
memory: 4220kb

input:

4 15 5431
3 2 1
4 4 4
6 1 4
6 5 5
2 6 2
7 6 1
6 10 10
2 11 7
4 8 10
2 1 4
1 2 2
10 7 9
3 1 16
17 6 11
5 17 8
7 13 1 6 15 3 2 14
3 9 12 12
8 15 12 14 2 9 16 5 4
8 8 11 7 9 14 13 6 11
5 10 17 11 8 19
5 18 4 17 16 1
3 14 5 14
3 3 6 2
6 11 18 15 15 5 1
8 10 14 9 13 2 14 19 2
4 2 17 2 6
7 6 7 2 9 5 11 17...

output:

No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
Yes
No
No
No
No
No
No
No
No
Yes
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
Yes
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
...

result:

ok 5431 token(s): yes count is 74, no count is 5357

Test #14:

score: 0
Accepted
time: 7ms
memory: 4552kb

input:

4 30000 5482
3 3 3
5 1 4
6 2 6
2 3 6
7 6 3
8 2 3
3 8 1
8 10 8
9 4 7
2 4 4
10 4 3
13 15 4
12 1 10
1 14 8
14 16 2
19 9 8
16 3 10
4 21 4
20 15 12
1 12 13
2 8 18
19 10 17
4 25 26
21 7 20
19 12 26
12 20 29
11 14 15
21 26 11
24 15 27
20 26 16
31 25 33
19 2 27
17 6 13
15 31 34
8 29 21
21 15 29
28 8 11
2 23...

output:

No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
...

result:

ok 5482 token(s): yes count is 0, no count is 5482

Test #15:

score: 0
Accepted
time: 2ms
memory: 4224kb

input:

5 0 4592
8 2 3 3 5 1 4 1 1
5 1 2 2 3 3
6 3 1 3 2 3 3
9 1 3 2 4 1 5 4 3 5
7 1 3 5 5 5 1 3
10 2 3 3 2 1 5 4 5 5 2
6 3 5 4 5 3 2
6 2 5 3 2 3 1
8 2 1 5 5 3 1 2 3
7 4 4 4 5 1 2 5
5 5 2 1 5 5
8 2 3 4 1 5 4 3 1
3 5 5 1
7 1 3 4 2 4 3 5
5 5 1 3 5 2
9 4 5 3 5 3 1 3 5 2
9 2 1 1 1 2 1 2 3 1
10 4 1 3 1 5 2 1 2 5...

output:

No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
Yes
No
Yes
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
Yes
No
No
No
No
No
...

result:

ok 4592 token(s): yes count is 57, no count is 4535

Test #16:

score: 0
Accepted
time: 4ms
memory: 3952kb

input:

5 1 4611
4 5 2
8 1 3 3 5 6 5 5 3
9 3 3 6 1 1 5 6 2 1
9 3 4 6 5 6 1 2 4 1
4 6 5 1 2
9 3 5 1 4 2 3 5 6 4
7 2 6 2 2 3 3 2
8 6 3 3 3 1 2 6 6
4 2 6 5 3
3 5 6 3
4 5 6 2 5
8 3 3 2 2 1 5 3 3
3 1 3 3
4 5 5 4 4
3 6 5 3
3 1 2 5
3 2 6 3
9 3 6 3 2 2 6 3 6 3
7 6 2 1 2 1 3 1
8 2 1 2 6 5 6 4 1
8 1 2 2 6 1 6 5 5
8 6...

output:

No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
...

result:

ok 4611 token(s): yes count is 24, no count is 4587

Test #17:

score: 0
Accepted
time: 5ms
memory: 4228kb

input:

5 3 4623
1 4 3
5 2 4
3 5 1
10 3 5 2 6 7 3 7 3 4 7
8 6 6 3 7 4 6 5 4
8 2 8 5 6 2 2 4 5
7 4 2 8 2 5 8 6
10 7 7 4 6 1 1 1 3 3 5
4 7 5 7 7
10 8 5 4 7 3 3 1 8 7 8
5 5 4 7 1 4
4 7 7 4 1
6 6 4 1 3 2 5
4 2 3 3 6
7 5 7 2 2 8 8 1
9 8 5 1 6 5 5 3 8 5
9 7 7 5 2 6 2 4 6 6
7 1 1 2 6 7 4 7
3 8 4 1
7 7 1 4 5 4 1 2
...

output:

No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
...

result:

ok 4623 token(s): yes count is 16, no count is 4607

Test #18:

score: 0
Accepted
time: 5ms
memory: 4020kb

input:

5 7 4636
5 3 4
6 3 3
7 1 6
1 7 1
7 1 4
3 9 8
9 11 2
7 8 10 1 2 8 3 10
6 6 7 10 9 1 7
8 11 8 2 3 3 7 5 11
3 4 8 10
9 2 7 1 10 1 5 2 4 12
10 6 12 9 3 2 12 5 7 7 6
7 3 7 8 10 11 5 9
9 5 12 5 2 3 5 5 2 3
10 12 11 7 7 7 5 5 11 10 1
10 5 12 7 5 2 12 11 8 4 10
4 8 7 6 2
4 12 10 8 10
4 3 12 1 4
10 8 1 4 6 5...

output:

No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
...

result:

ok 4636 token(s): yes count is 3, no count is 4633

Test #19:

score: 0
Accepted
time: 5ms
memory: 4020kb

input:

5 15 4603
5 1 4
3 3 6
1 5 4
8 6 5
9 3 4
4 1 5
6 8 6
12 10 7
6 6 12
13 2 7
4 14 8
13 3 3
7 1 13
12 6 5
17 7 13
6 4 18 16 20 7 17
9 16 10 2 17 13 13 6 15 5
4 11 16 16 15
3 16 12 1
5 9 10 13 15 20
9 9 13 12 11 12 9 16 13 7
6 20 16 13 4 7 20
10 1 4 3 5 12 20 5 4 19 18
3 5 19 8
3 5 9 3
8 11 14 7 9 19 19 ...

output:

No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
...

result:

ok 4603 token(s): yes count is 2, no count is 4601

Test #20:

score: 0
Accepted
time: 11ms
memory: 4620kb

input:

5 30000 4645
5 2 2
3 2 5
3 3 6
1 2 4
4 3 7
1 4 6
3 6 7
6 9 5
6 13 7
5 11 6
12 3 5
10 8 2
7 6 16
16 7 18
5 8 3
3 5 12
21 8 11
3 5 14
6 1 15
2 24 4
24 19 15
22 10 17
25 17 17
16 8 7
25 5 14
6 13 28
7 31 28
28 2 4
33 6 12
12 4 6
20 9 19
29 11 2
19 17 8
2 30 28
28 25 36
34 3 5
12 7 36
18 38 36
24 19 30
...

output:

No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
...

result:

ok 4645 token(s): yes count is 0, no count is 4645

Test #21:

score: 0
Accepted
time: 3ms
memory: 3988kb

input:

6 0 3993
10 2 5 6 2 3 2 2 5 5 3
3 4 1 5
10 6 5 5 1 6 2 6 1 4 5
11 2 2 6 3 5 3 1 6 3 2 2
9 1 2 5 4 6 1 4 5 6
7 5 4 6 3 3 4 4
9 3 1 3 4 2 1 4 5 5
12 5 6 4 2 5 4 4 2 5 1 4 2
9 1 2 4 1 4 5 4 6 4
7 2 1 4 3 3 4 4
4 6 6 3 3
3 3 1 6
7 5 3 3 1 4 2 6
12 3 6 5 6 6 6 2 4 1 6 2 5
5 5 2 1 6 2
7 1 6 1 5 3 1 2
8 6 ...

output:

No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
Yes
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No...

result:

ok 3993 token(s): yes count is 40, no count is 3953

Test #22:

score: 0
Accepted
time: 4ms
memory: 3920kb

input:

6 1 4036
6 5 4
3 3 3 5
12 3 1 5 1 4 4 4 6 3 3 5 4
8 5 2 2 7 2 3 7 3
4 7 7 4 3
4 5 2 2 6
12 2 7 3 1 7 5 4 7 1 4 3 6
7 7 4 3 6 1 6 7
11 1 1 3 3 3 6 1 4 1 5 7
5 1 7 3 4 6
11 2 1 1 5 7 4 3 2 1 1 2
6 2 1 3 6 2 5
5 6 6 6 1 4
5 4 2 7 4 3
5 5 7 5 3 6
12 4 6 2 5 6 6 4 7 5 4 1 4
11 2 2 5 4 3 6 3 3 4 3 1
9 2 7...

output:

No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
Yes
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
Yes
No
No
No
N...

result:

ok 4036 token(s): yes count is 70, no count is 3966

Test #23:

score: 0
Accepted
time: 4ms
memory: 3936kb

input:

6 3 4006
1 6 3
4 2 4
4 7 4
4 3 4 5 9
10 6 3 2 9 6 4 7 6 3 3
5 4 5 4 5 9
11 1 1 6 2 6 3 5 2 1 4 3
5 2 9 9 6 1
5 1 5 4 4 6
4 2 8 5 5
10 1 1 8 7 2 1 9 9 5 7
3 5 4 3
11 9 6 6 6 1 1 8 4 9 3 5
3 2 4 6
6 3 5 2 4 9 8
11 9 8 9 2 7 2 4 2 3 7 7
3 9 9 3
8 9 3 9 1 9 8 4 1
8 8 7 7 4 6 3 2 8
6 5 9 6 1 3 6
9 6 7 4 ...

output:

No
No
No
No
No
No
No
No
No
No
Yes
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No...

result:

ok 4006 token(s): yes count is 26, no count is 3980

Test #24:

score: 0
Accepted
time: 4ms
memory: 3916kb

input:

6 7 4001
2 3 2
5 7 6
1 8 8
9 8 3
8 3 3
2 6 11
4 5 1
4 2 7 13 7
12 13 4 10 10 9 10 7 13 8 7 8 2
11 11 13 5 3 12 7 8 8 10 2 13
7 2 1 1 10 1 1 3
7 6 10 9 1 4 6 4
3 5 4 11
6 7 10 1 8 8 2
3 13 3 9
4 9 8 6 5
7 1 3 3 5 9 2 13
9 12 3 4 4 5 3 12 5 1
6 1 8 2 1 9 3
6 2 2 11 6 9 8
6 12 10 8 9 2 1
9 7 8 10 6 7 7...

output:

No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
...

result:

ok 4001 token(s): yes count is 16, no count is 3985

Test #25:

score: 0
Accepted
time: 5ms
memory: 3968kb

input:

6 15 3991
4 3 2
3 7 1
5 1 5
9 3 9
9 6 5
10 6 11
1 12 7
4 10 12
3 7 11
3 1 14
7 3 9
16 7 7
10 9 13
8 3 3
5 2 12
5 15 14 18 2 5
11 9 20 20 19 12 14 6 9 17 20 13
6 20 20 19 6 21 5
7 21 1 21 12 4 11 12
11 7 6 14 5 2 8 18 10 6 13 2
7 11 12 19 20 12 9 9
12 3 13 17 4 1 15 15 14 2 5 5 13
4 11 20 6 15
3 9 3 ...

output:

No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
...

result:

ok 3991 token(s): yes count is 5, no count is 3986

Test #26:

score: 0
Accepted
time: 11ms
memory: 4432kb

input:

6 30000 3964
3 6 1
1 4 4
5 7 1
7 3 2
1 6 3
2 3 4
10 6 12
8 6 9
6 10 4
2 1 15
5 2 9
13 13 11
5 17 1
8 19 13
8 4 4
3 11 1
5 7 11
9 11 10
16 10 4
3 2 15
17 10 14
20 15 24
9 19 22
29 28 17
7 10 11
14 19 7
30 21 9
17 22 23
23 33 4
9 23 11
28 17 30
13 10 2
13 36 17
29 17 37
14 4 7
19 3 36
9 22 17
12 18 33...

output:

No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
...

result:

ok 3964 token(s): yes count is 0, no count is 3964

Test #27:

score: 0
Accepted
time: 4ms
memory: 3888kb

input:

7 0 3501
12 2 1 5 7 5 3 4 4 3 4 4 3
8 4 4 3 2 6 4 7 3
14 1 1 4 4 1 4 6 7 6 2 1 5 7 7
11 3 1 7 1 1 1 7 1 4 5 1
12 2 6 3 3 1 4 6 3 3 2 1 5
12 2 4 2 5 3 1 5 1 3 4 7 2
6 6 2 3 2 7 4
4 6 6 6 1
14 3 5 7 4 6 3 6 5 1 3 3 4 5 1
11 2 5 7 1 5 4 3 5 1 7 1
14 6 4 7 5 7 4 4 4 4 4 1 1 1 1
11 1 7 7 1 7 1 3 4 7 6 1
...

output:

No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
Yes
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No...

result:

ok 3501 token(s): yes count is 6, no count is 3495

Test #28:

score: 0
Accepted
time: 4ms
memory: 3900kb

input:

7 1 3527
3 4 2
10 1 4 8 2 5 4 7 1 1 7
13 8 6 8 8 1 5 1 7 2 8 2 6 5
12 1 5 8 3 4 1 6 5 8 4 5 8
4 3 6 3 8
13 8 1 1 5 6 1 2 6 4 7 6 7 5
6 7 2 8 2 6 4
4 2 7 5 6
13 2 3 2 6 4 7 7 4 4 6 1 6 6
11 4 6 3 5 4 3 7 4 6 1 2
5 5 7 8 2 6
9 1 7 4 1 1 3 5 8 1
5 2 3 4 8 3
12 3 8 1 6 2 3 3 1 8 6 2 4
9 3 4 2 2 7 4 4 1 ...

output:

No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
...

result:

ok 3527 token(s): yes count is 7, no count is 3520

Test #29:

score: 0
Accepted
time: 5ms
memory: 4196kb

input:

7 3 3538
5 3 2
6 6 3
3 9 9
14 2 1 10 9 8 3 2 10 3 3 7 2 8 7
3 9 1 8
7 2 1 2 7 3 10 7
4 9 6 10 7
11 3 6 8 2 9 1 9 2 5 7 5
9 9 9 5 7 6 1 6 9 9
4 2 2 5 6
14 1 4 6 9 7 1 2 3 10 10 7 1 5 2
10 9 9 4 1 8 2 1 3 10 9
3 8 2 1
5 10 8 6 10 8
3 3 4 4
6 2 10 7 5 2 8
14 4 2 5 5 9 10 4 3 8 7 4 6 8 6
8 8 1 9 6 7 9 1...

output:

No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
Yes
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No...

result:

ok 3538 token(s): yes count is 10, no count is 3528

Test #30:

score: 0
Accepted
time: 5ms
memory: 4012kb

input:

7 7 3528
1 3 1
8 1 8
5 8 7
3 2 9
10 5 2
10 1 12
4 8 13
5 6 12 1 11 10
13 5 10 13 1 8 10 9 10 1 6 7 14 12
3 2 12 11
11 9 1 3 9 9 11 12 1 11 5 13
5 8 10 14 5 2
7 14 10 7 14 10 3 9
3 7 5 10
7 5 4 7 12 14 3 12
5 2 10 4 12 11
13 5 6 11 5 5 9 3 10 13 7 13 5 1
9 8 3 1 5 1 11 6 12 1
8 5 5 2 1 7 4 5 13
5 13 ...

output:

No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
Yes
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No...

result:

ok 3528 token(s): yes count is 5, no count is 3523

Test #31:

score: 0
Accepted
time: 5ms
memory: 3900kb

input:

7 15 3520
1 2 5
6 5 7
7 6 2
2 1 2
4 1 10
5 9 12
12 11 12
9 8 10
11 4 4
16 16 5
12 10 8
12 8 4
12 2 6
1 9 9
15 13 15
8 1 17 11 11 20 13 19 19
5 16 21 15 1 14
11 10 21 6 22 15 3 20 15 7 1 16
12 4 6 21 12 12 21 12 10 19 11 14 15
8 6 19 11 17 1 21 15 15
9 22 7 10 6 2 19 19 16 21
4 13 5 4 2
10 1 15 14 17...

output:

No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
...

result:

ok 3520 token(s): yes count is 3, no count is 3517

Test #32:

score: 0
Accepted
time: 11ms
memory: 4480kb

input:

7 30000 3552
3 3 5
6 8 6
9 2 4
7 10 9
10 5 8
12 8 3
10 7 1
14 1 8
8 15 4
3 10 4
11 5 7
5 18 14
14 11 17
18 20 5
13 4 9
12 3 10
21 13 20
11 23 15
18 11 3
22 5 8
4 4 8
24 12 9
3 5 27
9 8 29
3 7 25
23 18 17
7 4 11
33 13 19
28 10 17
4 12 18
21 28 31
1 24 38
26 14 37
29 22 6
30 24 37
1 27 21
37 23 3
35 3...

output:

No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
...

result:

ok 3552 token(s): yes count is 0, no count is 3552

Test #33:

score: 0
Accepted
time: 4ms
memory: 3964kb

input:

8 0 3143
5 1 3 3 2 8
16 3 2 1 6 7 4 8 5 2 2 2 6 6 8 2 8
15 8 5 6 8 7 6 6 4 5 3 4 1 1 6 8
7 3 5 3 7 1 2 7
15 2 3 4 4 6 3 3 8 4 7 7 2 1 3 7
6 8 3 6 8 5 2
15 2 1 6 2 1 1 1 8 2 7 2 2 5 7 2
3 6 3 8
6 5 8 5 1 7 7
3 1 2 5
8 7 5 3 5 8 6 6 7
12 2 8 7 1 8 5 8 3 6 7 7 4
11 3 6 3 3 2 5 3 7 1 5 3
4 1 3 6 5
13 3 ...

output:

No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
...

result:

ok 3143 token(s): yes count is 12, no count is 3131

Test #34:

score: 0
Accepted
time: 4ms
memory: 3956kb

input:

8 1 3140
1 2 3
10 7 9 4 8 3 2 9 5 5 4
16 3 4 5 3 8 2 3 6 5 8 6 9 8 3 7 6
11 7 9 4 2 2 3 5 6 3 1 9
4 4 4 9 6
11 6 1 5 6 1 1 2 2 5 9 8
12 9 4 5 7 4 5 6 1 3 4 7 7
14 3 6 9 8 7 2 5 8 4 8 4 4 7 1
12 5 6 8 2 4 6 1 3 4 5 6 7
4 2 9 8 7
8 5 5 9 5 4 6 1 7
15 5 6 5 2 9 7 3 5 7 2 9 6 4 5 7
12 1 7 8 6 1 5 4 8 1 ...

output:

No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
...

result:

ok 3140 token(s): yes count is 3, no count is 3137

Test #35:

score: 0
Accepted
time: 5ms
memory: 3964kb

input:

8 3 3133
6 3 5
1 8 1
9 2 1
12 7 5 7 8 3 2 3 1 1 9 7 7
11 8 8 3 2 4 7 2 2 1 4 4
9 8 10 11 11 10 10 6 4 7
10 9 2 11 1 5 5 9 3 3 4
16 11 5 3 2 4 11 11 11 5 3 11 2 8 2 11 1
15 1 11 3 9 7 6 2 11 5 4 8 6 6 9 4
5 6 10 2 1 5
9 1 1 10 9 7 4 4 10 10
16 9 3 5 8 8 6 8 8 8 4 7 2 6 4 2 4
13 11 3 3 11 5 3 10 1 8 1...

output:

No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
...

result:

ok 3133 token(s): yes count is 2, no count is 3131

Test #36:

score: 0
Accepted
time: 2ms
memory: 3884kb

input:

8 7 3178
7 4 8
8 6 2
10 3 9
9 11 2
8 12 7
2 2 6
13 10 12
16 2 14 7 13 15 11 4 14 6 15 12 1 13 14 9 14
6 3 11 2 8 7 10
6 12 10 15 10 4 7
4 4 14 3 8
4 2 9 3 12
11 6 7 4 8 15 13 12 6 15 4 15
7 14 2 11 8 15 5 14
12 10 15 7 10 1 4 9 3 3 2 13 13
5 4 12 8 11 5
4 9 7 1 1
8 1 6 12 4 15 4 8 5
6 5 3 13 14 3 2
...

output:

No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
...

result:

ok 3178 token(s): yes count is 1, no count is 3177

Test #37:

score: 0
Accepted
time: 5ms
memory: 3876kb

input:

8 15 3128
4 1 8
8 8 5
3 7 4
3 1 9
8 11 5
8 4 5
13 4 13
5 12 6
2 2 7
6 13 9
10 7 9
17 11 3
4 17 6
19 15 15
11 16 11
9 15 4 1 4 12 16 6 5 15
6 4 18 15 13 14 12
8 17 10 22 10 3 4 9 9
6 15 17 17 22 5 12
6 15 5 21 19 4 23
6 7 7 4 11 16 3
11 10 17 18 18 12 23 5 10 13 14 23
6 12 11 4 19 18 3
14 14 20 16 20...

output:

No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
...

result:

ok 3128 token(s): yes count is 1, no count is 3127

Test #38:

score: 0
Accepted
time: 11ms
memory: 4396kb

input:

8 30000 3214
6 5 3
8 9 4
10 7 1
8 3 3
12 10 6
9 2 4
10 12 3
12 6 9
15 4 9
4 9 17
13 5 17
13 3 17
6 13 20
12 8 20
4 22 15
3 13 15
14 3 11
15 12 8
1 24 20
16 4 22
28 3 5
2 22 23
11 7 1
19 25 4
11 32 9
31 3 1
32 23 33
30 17 4
23 3 9
36 20 17
10 16 36
12 10 27
37 2 33
1 35 34
26 35 28
11 26 42
10 28 43
...

output:

No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
...

result:

ok 3214 token(s): yes count is 0, no count is 3214

Test #39:

score: 0
Accepted
time: 5ms
memory: 3932kb

input:

9 0 2872
7 3 9 7 5 6 9 8
3 6 7 2
3 4 6 1
5 4 6 4 5 1
18 3 8 5 6 7 5 3 8 7 9 2 1 5 5 6 5 8 3
11 3 5 3 8 8 1 9 7 2 1 8
12 2 8 5 7 1 3 3 3 3 4 6 6
6 8 4 8 3 9 9
8 4 3 3 6 9 7 1 5
12 5 9 7 8 9 6 3 2 6 9 6 1
15 3 7 7 6 8 2 9 6 9 4 3 5 7 9 7
16 6 6 7 8 6 8 5 8 1 4 8 2 4 5 5 6
10 3 8 2 7 8 8 1 2 7 3
18 6 5...

output:

No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
...

result:

ok 2872 token(s): yes count is 10, no count is 2862

Test #40:

score: 0
Accepted
time: 5ms
memory: 3872kb

input:

9 1 2864
6 1 1
5 1 5 8 3 7
10 6 9 3 10 4 8 8 1 2 7
5 3 8 8 5 3
4 5 9 9 9
12 5 1 5 1 8 2 5 7 9 3 10 7
13 3 10 8 3 1 6 8 2 4 10 4 7 6
4 6 2 9 9
4 7 4 6 4
8 5 2 1 8 2 9 10 4
11 9 4 6 1 8 1 3 7 4 4 7
12 9 9 10 8 7 6 8 6 5 1 7 7
16 8 9 4 6 1 10 6 4 9 4 10 6 8 10 9 7
9 9 7 3 8 4 4 5 1 6
3 2 10 5
3 10 10 4...

output:

No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
...

result:

ok 2864 token(s): yes count is 13, no count is 2851

Test #41:

score: 0
Accepted
time: 2ms
memory: 3872kb

input:

9 3 2860
8 9 8
8 4 3
9 4 2
3 12 1 2
18 4 7 6 1 11 8 7 10 3 11 3 2 3 10 2 6 3 11
15 5 10 4 3 4 3 12 4 7 12 3 4 10 6 10
16 1 3 1 6 12 11 11 6 3 12 5 10 8 1 4 8
18 3 6 12 10 3 5 5 3 1 8 11 7 9 4 3 7 12 8
8 1 3 5 1 3 1 11 2
14 12 6 10 9 8 2 10 5 7 8 11 6 2 11
3 6 11 7
5 11 5 1 9 3
10 5 9 1 6 11 3 6 2 11...

output:

No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
...

result:

ok 2860 token(s): yes count is 5, no count is 2855

Test #42:

score: 0
Accepted
time: 6ms
memory: 4184kb

input:

9 7 2863
7 5 6
5 7 1
5 2 3
2 12 5
3 1 11
4 10 11
12 11 7
3 5 15 13
6 9 16 12 9 7 14
5 16 13 13 1 14
12 2 9 10 5 7 3 2 6 11 9 4 11
17 11 5 5 9 11 13 8 5 2 9 14 15 9 8 5 10 1
17 12 12 12 5 10 15 1 7 8 2 11 5 1 6 11 3 9
4 2 9 3 16
10 4 10 13 8 3 9 13 1 10 3
6 6 2 12 14 15 7
15 8 6 9 4 4 11 12 2 10 1 8 ...

output:

No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
...

result:

ok 2863 token(s): yes count is 0, no count is 2863

Test #43:

score: 0
Accepted
time: 6ms
memory: 3884kb

input:

9 15 2871
4 8 9
4 10 5
2 5 1
8 11 3
8 3 5
11 3 1
12 5 1
14 14 6
17 2 10
9 3 17
11 13 4
16 16 4
21 16 14
17 19 17
18 15 22
10 21 8 11 3 21 1 7 2 24 3
14 9 9 22 4 18 5 4 1 10 23 22 13 2 13
7 19 15 8 10 20 10 8
8 11 24 14 2 18 11 9 9
4 23 18 17 23
8 15 22 10 13 19 23 21 12
14 23 2 2 12 21 5 7 9 20 21 9...

output:

No
No
No
No
No
No
No
No
No
No
No
No
No
No
Yes
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No...

result:

ok 2871 token(s): yes count is 3, no count is 2868

Test #44:

score: 0
Accepted
time: 7ms
memory: 4408kb

input:

9 30000 2824
4 3 3
3 3 9
1 3 1
9 2 10
3 1 4
13 3 12
4 3 15
2 5 3
15 9 17
15 15 14
1 19 19
20 7 18
7 6 1
13 7 10
20 14 12
2 20 8
18 4 10
12 19 25
21 3 14
2 19 25
7 16 16
2 26 21
23 30 29
18 13 7
20 19 17
29 26 24
10 22 10
7 16 26
36 5 35
25 38 7
12 34 31
37 8 26
40 17 7
19 42 15
37 12 42
40 43 13
7 2...

output:

No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
...

result:

ok 2824 token(s): yes count is 0, no count is 2824

Test #45:

score: 0
Accepted
time: 5ms
memory: 3940kb

input:

10 0 2571
15 7 5 6 2 1 8 2 4 7 8 6 6 10 7 10
8 6 6 9 10 6 10 5 7
12 3 1 2 8 8 4 2 8 1 9 8 2
7 7 6 9 2 8 7 4
11 8 2 3 6 6 10 5 5 5 7 8
18 6 9 6 8 9 2 2 3 3 2 8 10 10 10 1 2 6 1
20 9 10 4 10 7 10 10 6 10 9 9 1 9 5 3 1 2 1 4 4
15 10 5 4 9 7 8 10 9 8 8 8 10 3 2 3
17 10 7 5 9 9 9 1 10 1 6 3 3 3 9 1 4 4
4...

output:

No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
...

result:

ok 2571 token(s): yes count is 3, no count is 2568

Test #46:

score: 0
Accepted
time: 5ms
memory: 4152kb

input:

10 1 2599
7 5 4
5 1 11 10 10 2
5 6 7 7 6 1
17 3 4 4 7 1 6 9 2 9 11 9 8 9 7 7 10 5
5 10 6 5 8 5
12 6 7 4 1 1 10 10 10 5 8 5 11
12 10 6 4 3 4 5 2 4 5 11 1 8
18 9 9 10 10 3 10 11 6 4 10 6 3 11 3 4 2 6 6
4 8 9 5 4
12 6 7 3 1 11 3 10 8 7 9 1 7
20 11 4 6 10 10 7 2 11 1 10 3 1 5 9 9 6 1 3 9 2
20 5 6 9 2 3 ...

output:

No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
...

result:

ok 2599 token(s): yes count is 1, no count is 2598

Test #47:

score: 0
Accepted
time: 6ms
memory: 3952kb

input:

10 3 2632
1 4 5
5 5 8
12 11 3
11 6 11 11 13 12 10 8 7 13 6 2
8 12 12 8 2 2 5 5 12
9 9 1 3 8 2 12 6 7 5
18 6 8 8 12 12 13 10 9 10 7 6 9 2 7 12 13 9 12
4 11 13 5 10
20 1 7 5 2 9 6 6 13 11 10 13 6 9 1 4 2 11 4 3 13
9 8 11 9 1 8 12 11 4 6
18 2 8 6 6 11 4 8 10 6 12 4 8 4 9 9 9 8 3
7 11 7 3 4 11 7 10
8 10...

output:

No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
...

result:

ok 2632 token(s): yes count is 2, no count is 2630

Test #48:

score: 0
Accepted
time: 5ms
memory: 3864kb

input:

10 7 2606
10 3 3
11 4 4
9 12 8
2 12 11
6 5 9
5 11 9
16 5 11
10 5 3 10 7 10 12 3 4 13 15
19 7 16 10 5 2 16 10 15 13 5 8 2 15 15 4 14 16 10 8
11 16 11 12 2 3 12 16 5 2 15 14
17 12 1 3 17 9 8 1 17 5 3 1 9 12 16 7 10 11
20 10 5 7 6 15 15 2 15 12 3 5 4 15 11 16 15 3 13 3 12
16 16 4 9 10 2 5 10 14 5 4 12 ...

output:

No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
Yes
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No...

result:

ok 2606 token(s): yes count is 3, no count is 2603

Test #49:

score: 0
Accepted
time: 6ms
memory: 3916kb

input:

10 15 2604
2 1 3
5 2 1
12 1 2
13 9 7
3 13 8
7 14 8
5 11 8
10 10 2
9 17 7
15 18 3
13 3 2
4 2 18
2 22 10
20 16 8
10 13 4
13 6 6 16 5 23 13 2 14 22 4 16 4 21
9 2 15 23 8 13 11 16 8 16
6 19 3 13 8 3 18
6 20 16 25 14 25 24
19 21 4 15 10 15 22 5 1 8 23 1 1 20 13 17 9 3 23 2
13 16 7 13 24 11 23 23 22 19 18...

output:

No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
...

result:

ok 2604 token(s): yes count is 0, no count is 2604

Test #50:

score: 0
Accepted
time: 8ms
memory: 4424kb

input:

10 30000 2657
3 4 3
2 6 4
1 12 9
11 6 9
8 5 3
4 14 10
12 4 12
15 2 15
9 14 7
4 7 1
16 9 19
12 10 4
15 7 7
17 10 5
8 8 24
14 9 8
18 21 22
17 26 18
26 1 2
10 6 3
24 26 17
21 18 10
18 20 16
12 33 18
29 29 31
1 35 28
31 15 1
3 11 23
9 30 21
16 6 37
11 29 35
15 14 5
20 34 11
28 28 9
38 20 11
16 26 13
20 ...

output:

No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
...

result:

ok 2657 token(s): yes count is 0, no count is 2657

Test #51:

score: 0
Accepted
time: 5ms
memory: 3860kb

input:

11 0 2431
12 3 6 8 8 10 2 1 6 10 10 5 4
4 10 7 3 4
6 10 10 8 6 6 9
15 2 5 5 8 9 3 8 1 9 6 8 8 2 9 3
8 5 10 8 4 7 4 9 11
19 7 1 2 1 7 5 8 7 5 2 1 5 3 3 5 3 3 6 2
7 5 8 9 7 10 3 10
8 3 8 9 6 4 7 6 4
5 8 10 1 9 4
11 9 4 1 11 7 2 4 1 3 4 10
3 10 7 2
19 8 6 2 4 2 8 10 4 7 10 1 3 1 5 6 8 2 1 1
3 9 9 5
3 8...

output:

No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
...

result:

ok 2431 token(s): yes count is 1, no count is 2430

Test #52:

score: 0
Accepted
time: 2ms
memory: 3864kb

input:

11 1 2418
8 5 9
10 12 6 8 6 9 5 12 2 1 4
10 7 2 9 8 8 11 11 3 6 5
4 11 1 6 9
9 11 2 3 7 10 5 11 8 5
4 11 1 10 7
3 7 7 11
7 2 8 10 4 1 7 9
3 10 8 4
12 3 9 1 7 6 7 4 12 7 7 9 10
19 3 11 2 4 10 1 6 2 12 4 9 1 3 7 11 10 7 7 3
4 3 3 12 8
19 5 5 8 2 6 5 11 4 6 11 8 6 6 10 12 4 8 10 11
18 11 2 1 2 5 1 11 9...

output:

No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
...

result:

ok 2418 token(s): yes count is 2, no count is 2416

Test #53:

score: 0
Accepted
time: 6ms
memory: 4096kb

input:

11 3 2414
3 8 2
2 2 1
13 8 7
8 10 14 2 7 8 3 8 7
17 5 7 11 8 10 12 13 10 2 3 10 13 9 2 10 1 6
8 7 12 8 5 7 5 2 2
12 9 1 14 11 12 3 5 4 8 10 9 4
10 6 3 7 12 13 12 9 11 3 8
6 5 7 8 7 5 3
10 2 2 8 10 1 8 13 11 10 8
18 5 10 8 7 8 1 5 14 10 1 8 12 14 5 2 14 2 7
9 9 7 3 3 9 10 9 9 5
17 5 2 8 13 2 4 7 14 8...

output:

No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
...

result:

ok 2414 token(s): yes count is 1, no count is 2413

Test #54:

score: 0
Accepted
time: 6ms
memory: 3916kb

input:

11 7 2401
4 9 5
8 5 6
10 11 10
1 14 8
1 13 10
5 5 12
14 16 6
11 10 15 14 13 2 14 1 13 17 8 11
21 11 3 7 16 5 18 10 4 4 6 7 18 1 2 1 8 15 9 15 1 4
20 15 18 8 15 15 10 1 12 1 10 3 3 2 5 15 6 7 15 14 4
21 18 7 12 15 7 8 1 14 17 8 5 6 11 6 14 13 5 17 2 7 4
8 15 3 10 5 3 10 9 9
8 11 6 13 6 11 3 4 16
19 1...

output:

No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
...

result:

ok 2401 token(s): yes count is 0, no count is 2401

Test #55:

score: 0
Accepted
time: 6ms
memory: 3868kb

input:

11 15 2397
2 1 2
2 4 12
9 8 7
2 1 1
4 12 6
7 16 16
10 5 9
6 10 8
11 18 18
18 14 9
3 6 11
11 3 22
11 20 3
16 14 17
8 16 6
8 6 8 5 23 19 4 5 9
3 25 13 2
13 12 3 17 26 11 5 8 10 15 3 5 23 26
6 20 5 24 11 11 11
3 20 4 14
12 19 8 14 17 4 1 20 25 25 2 1 22
13 23 8 1 20 26 21 20 20 3 1 11 14 12
16 2 12 17 ...

output:

No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
...

result:

ok 2397 token(s): yes count is 0, no count is 2397

Test #56:

score: 0
Accepted
time: 10ms
memory: 4472kb

input:

11 30000 2437
7 1 2
12 12 11
9 7 4
10 9 5
15 13 5
5 12 11
16 9 12
3 6 6
12 11 19
12 1 15
3 17 3
4 4 4
2 18 19
12 18 17
24 7 1
10 12 22
1 2 8
4 14 17
20 1 1
3 22 11
1 19 8
25 7 22
20 8 26
6 16 25
20 13 2
25 31 12
21 29 13
14 1 10
20 7 25
32 29 13
34 27 11
16 1 14
39 33 22
25 4 26
13 43 32
13 44 19
32...

output:

No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
...

result:

ok 2437 token(s): yes count is 0, no count is 2437

Test #57:

score: 0
Accepted
time: 5ms
memory: 3932kb

input:

12 0 2201
12 12 3 3 2 2 4 4 6 7 6 4 4
9 10 10 10 7 2 1 2 8 12
5 1 5 7 9 7
17 9 11 4 10 3 4 9 4 4 5 9 6 6 7 5 2 11
9 12 7 5 6 3 1 7 3 10
24 2 4 12 10 12 5 3 8 9 9 7 6 9 11 11 2 11 6 7 11 10 9 4 12
4 8 10 5 11
15 8 4 3 4 4 9 11 3 1 11 9 6 7 1 5
7 10 9 4 5 7 5 11
13 10 1 2 1 7 10 2 3 9 10 6 3 10
9 7 9 ...

output:

No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
...

result:

ok 2201 token(s): yes count is 4, no count is 2197

Test #58:

score: 0
Accepted
time: 6ms
memory: 3932kb

input:

12 1 2228
10 12 3
18 3 7 7 5 5 3 7 10 9 5 8 5 1 10 10 13 11 8
10 10 12 12 2 13 13 2 7 1 9
19 1 13 4 13 9 12 11 10 5 4 11 9 9 4 11 6 7 13 4
9 9 2 8 1 2 11 10 13 3
14 6 11 5 7 8 8 9 9 7 1 2 7 11 11
23 12 5 3 6 8 6 3 7 4 10 9 3 6 12 7 12 13 13 6 3 11 1 1
16 4 5 4 12 11 10 3 3 13 6 9 3 5 5 11 12
18 7 7 ...

output:

No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
...

result:

ok 2228 token(s): yes count is 3, no count is 2225

Test #59:

score: 0
Accepted
time: 2ms
memory: 4136kb

input:

12 3 2252
6 9 9
9 11 5
11 9 11
20 2 12 5 14 7 9 10 10 13 4 3 12 12 12 6 4 14 12 14 13
16 11 4 5 12 3 6 9 4 14 5 4 5 13 3 9 12
7 8 10 13 5 12 3 11
19 5 8 13 1 4 15 9 2 13 5 7 14 1 7 3 10 3 10 11
6 5 1 5 6 14 15
16 4 6 9 4 4 2 8 12 7 2 3 4 5 14 2 2
23 2 15 11 10 8 11 9 3 1 3 6 10 4 15 10 14 1 14 12 2 ...

output:

No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
...

result:

ok 2252 token(s): yes count is 5, no count is 2247

Test #60:

score: 0
Accepted
time: 3ms
memory: 3872kb

input:

12 7 2208
7 7 8
9 9 9
8 8 13
5 2 3
8 8 12
16 17 1
5 12 15
24 7 14 15 16 16 8 4 18 2 14 9 2 17 9 10 3 6 6 12 13 3 10 2 8
10 10 19 9 14 1 15 11 12 12 17
9 15 7 15 11 6 14 19 7 10
16 12 18 19 1 9 5 19 5 2 1 19 18 13 17 10 11
16 8 9 19 3 3 10 3 9 9 8 11 14 14 18 14 11
3 1 4 3
17 6 13 2 1 12 1 3 13 5 6 1...

output:

No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
...

result:

ok 2208 token(s): yes count is 2, no count is 2206

Test #61:

score: 0
Accepted
time: 7ms
memory: 3928kb

input:

12 15 2238
11 3 10
8 13 8
1 1 6
5 13 15
3 12 16
5 10 17
1 2 10
9 12 18
17 6 14
3 21 12
21 3 1
8 2 5
24 23 21
9 11 9
22 4 12
11 18 3 1 15 5 16 26 24 25 26 5
21 18 6 19 5 15 4 24 7 20 22 20 1 11 20 13 18 22 14 27 10 21
22 12 22 10 20 2 11 6 26 19 25 16 21 17 11 10 18 22 15 4 5 10 19
13 25 2 9 10 7 16 ...

output:

No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
...

result:

ok 2238 token(s): yes count is 0, no count is 2238

Test #62:

score: 0
Accepted
time: 9ms
memory: 4548kb

input:

12 30000 2236
7 12 11
11 7 8
2 5 12
13 10 10
16 13 14
3 16 9
8 10 9
1 2 2
12 13 9
8 21 20
10 6 21
8 2 12
14 21 10
18 11 7
18 24 9
17 14 16
23 13 25
21 2 4
23 29 29
28 23 5
9 32 4
2 7 30
7 2 7
24 11 24
5 17 19
12 3 21
29 17 31
11 8 21
23 38 6
39 14 35
42 28 4
36 39 7
30 10 23
23 43 35
4 41 43
44 25 1...

output:

No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
...

result:

ok 2236 token(s): yes count is 0, no count is 2236

Test #63:

score: 0
Accepted
time: 1ms
memory: 3552kb

input:

3 4 1
2 1 3
4 2 3
5 2 1
6 3 1
6 1 2 4 5 6 7

output:

Yes

result:

ok YES

Test #64:

score: 0
Accepted
time: 0ms
memory: 3584kb

input:

4 6 1
2 4 3
5 2 3
6 1 4
7 3 4
8 2 1
9 4 1
8 1 2 5 6 7 8 9 10

output:

No

result:

ok NO

Test #65:

score: 0
Accepted
time: 0ms
memory: 3528kb

input:

5 8 1
2 5 4
6 2 3
7 1 5
8 3 4
9 2 1
10 4 5
11 3 2
12 5 1
10 1 2 6 7 8 9 10 11 12 13

output:

Yes

result:

ok YES

Test #66:

score: 0
Accepted
time: 0ms
memory: 3556kb

input:

6 10 1
2 5 4
7 2 3
8 6 5
9 3 4
10 1 6
11 4 5
12 2 1
13 5 6
14 3 2
15 6 1
12 1 2 7 8 9 10 11 12 13 14 15 16

output:

No

result:

ok NO

Test #67:

score: 0
Accepted
time: 1ms
memory: 3608kb

input:

7 12 1
2 6 5
8 2 3
9 7 6
10 3 4
11 1 7
12 4 5
13 2 1
14 5 6
15 3 2
16 6 7
17 4 3
18 7 1
14 1 2 8 9 10 11 12 13 14 15 16 17 18 19

output:

Yes

result:

ok YES

Test #68:

score: 0
Accepted
time: 1ms
memory: 3600kb

input:

8 14 1
2 6 5
9 2 3
10 7 6
11 3 4
12 8 7
13 4 5
14 1 8
15 5 6
16 2 1
17 6 7
18 3 2
19 7 8
20 4 3
21 8 1
16 1 2 9 10 11 12 13 14 15 16 17 18 19 20 21 22

output:

No

result:

ok NO

Test #69:

score: 0
Accepted
time: 0ms
memory: 3616kb

input:

9 16 1
2 7 6
10 2 3
11 8 7
12 3 4
13 9 8
14 4 5
15 1 9
16 5 6
17 2 1
18 6 7
19 3 2
20 7 8
21 4 3
22 8 9
23 5 4
24 9 1
18 1 2 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25

output:

Yes

result:

ok YES

Test #70:

score: 0
Accepted
time: 0ms
memory: 3536kb

input:

10 18 1
2 7 6
11 2 3
12 8 7
13 3 4
14 9 8
15 4 5
16 10 9
17 5 6
18 1 10
19 6 7
20 2 1
21 7 8
22 3 2
23 8 9
24 4 3
25 9 10
26 5 4
27 10 1
20 1 2 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28

output:

No

result:

ok NO

Test #71:

score: 0
Accepted
time: 1ms
memory: 3548kb

input:

100 198 1
2 52 51
101 2 3
102 53 52
103 3 4
104 54 53
105 4 5
106 55 54
107 5 6
108 56 55
109 6 7
110 57 56
111 7 8
112 58 57
113 8 9
114 59 58
115 9 10
116 60 59
117 10 11
118 61 60
119 11 12
120 62 61
121 12 13
122 63 62
123 13 14
124 64 63
125 14 15
126 65 64
127 15 16
128 66 65
129 16 17
130 67 ...

output:

No

result:

ok NO

Test #72:

score: 0
Accepted
time: 1ms
memory: 3540kb

input:

101 200 1
2 53 52
102 2 3
103 54 53
104 3 4
105 55 54
106 4 5
107 56 55
108 5 6
109 57 56
110 6 7
111 58 57
112 7 8
113 59 58
114 8 9
115 60 59
116 9 10
117 61 60
118 10 11
119 62 61
120 11 12
121 63 62
122 12 13
123 64 63
124 13 14
125 65 64
126 14 15
127 66 65
128 15 16
129 67 66
130 16 17
131 68 ...

output:

Yes

result:

ok YES

Test #73:

score: 0
Accepted
time: 1ms
memory: 3544kb

input:

102 202 1
2 53 52
103 2 3
104 54 53
105 3 4
106 55 54
107 4 5
108 56 55
109 5 6
110 57 56
111 6 7
112 58 57
113 7 8
114 59 58
115 8 9
116 60 59
117 9 10
118 61 60
119 10 11
120 62 61
121 11 12
122 63 62
123 12 13
124 64 63
125 13 14
126 65 64
127 14 15
128 66 65
129 15 16
130 67 66
131 16 17
132 68 ...

output:

No

result:

ok NO

Test #74:

score: 0
Accepted
time: 1ms
memory: 3552kb

input:

103 204 1
2 54 53
104 2 3
105 55 54
106 3 4
107 56 55
108 4 5
109 57 56
110 5 6
111 58 57
112 6 7
113 59 58
114 7 8
115 60 59
116 8 9
117 61 60
118 9 10
119 62 61
120 10 11
121 63 62
122 11 12
123 64 63
124 12 13
125 65 64
126 13 14
127 66 65
128 14 15
129 67 66
130 15 16
131 68 67
132 16 17
133 69 ...

output:

Yes

result:

ok YES

Test #75:

score: 0
Accepted
time: 1ms
memory: 3548kb

input:

104 206 1
2 54 53
105 2 3
106 55 54
107 3 4
108 56 55
109 4 5
110 57 56
111 5 6
112 58 57
113 6 7
114 59 58
115 7 8
116 60 59
117 8 9
118 61 60
119 9 10
120 62 61
121 10 11
122 63 62
123 11 12
124 64 63
125 12 13
126 65 64
127 13 14
128 66 65
129 14 15
130 67 66
131 15 16
132 68 67
133 16 17
134 69 ...

output:

No

result:

ok NO

Test #76:

score: 0
Accepted
time: 0ms
memory: 3828kb

input:

105 208 1
2 55 54
106 2 3
107 56 55
108 3 4
109 57 56
110 4 5
111 58 57
112 5 6
113 59 58
114 6 7
115 60 59
116 7 8
117 61 60
118 8 9
119 62 61
120 9 10
121 63 62
122 10 11
123 64 63
124 11 12
125 65 64
126 12 13
127 66 65
128 13 14
129 67 66
130 14 15
131 68 67
132 15 16
133 69 68
134 16 17
135 70 ...

output:

Yes

result:

ok YES

Test #77:

score: 0
Accepted
time: 1ms
memory: 3544kb

input:

106 210 1
2 55 54
107 2 3
108 56 55
109 3 4
110 57 56
111 4 5
112 58 57
113 5 6
114 59 58
115 6 7
116 60 59
117 7 8
118 61 60
119 8 9
120 62 61
121 9 10
122 63 62
123 10 11
124 64 63
125 11 12
126 65 64
127 12 13
128 66 65
129 13 14
130 67 66
131 14 15
132 68 67
133 15 16
134 69 68
135 16 17
136 70 ...

output:

No

result:

ok NO

Test #78:

score: 0
Accepted
time: 1ms
memory: 3616kb

input:

107 212 1
2 56 55
108 2 3
109 57 56
110 3 4
111 58 57
112 4 5
113 59 58
114 5 6
115 60 59
116 6 7
117 61 60
118 7 8
119 62 61
120 8 9
121 63 62
122 9 10
123 64 63
124 10 11
125 65 64
126 11 12
127 66 65
128 12 13
129 67 66
130 13 14
131 68 67
132 14 15
133 69 68
134 15 16
135 70 69
136 16 17
137 71 ...

output:

Yes

result:

ok YES

Test #79:

score: 0
Accepted
time: 1ms
memory: 3620kb

input:

108 214 1
2 56 55
109 2 3
110 57 56
111 3 4
112 58 57
113 4 5
114 59 58
115 5 6
116 60 59
117 6 7
118 61 60
119 7 8
120 62 61
121 8 9
122 63 62
123 9 10
124 64 63
125 10 11
126 65 64
127 11 12
128 66 65
129 12 13
130 67 66
131 13 14
132 68 67
133 14 15
134 69 68
135 15 16
136 70 69
137 16 17
138 71 ...

output:

No

result:

ok NO

Test #80:

score: 0
Accepted
time: 1ms
memory: 3548kb

input:

109 216 1
2 57 56
110 2 3
111 58 57
112 3 4
113 59 58
114 4 5
115 60 59
116 5 6
117 61 60
118 6 7
119 62 61
120 7 8
121 63 62
122 8 9
123 64 63
124 9 10
125 65 64
126 10 11
127 66 65
128 11 12
129 67 66
130 12 13
131 68 67
132 13 14
133 69 68
134 14 15
135 70 69
136 15 16
137 71 70
138 16 17
139 72 ...

output:

Yes

result:

ok YES

Test #81:

score: 0
Accepted
time: 1ms
memory: 3832kb

input:

110 218 1
2 57 56
111 2 3
112 58 57
113 3 4
114 59 58
115 4 5
116 60 59
117 5 6
118 61 60
119 6 7
120 62 61
121 7 8
122 63 62
123 8 9
124 64 63
125 9 10
126 65 64
127 10 11
128 66 65
129 11 12
130 67 66
131 12 13
132 68 67
133 13 14
134 69 68
135 14 15
136 70 69
137 15 16
138 71 70
139 16 17
140 72 ...

output:

No

result:

ok NO

Test #82:

score: 0
Accepted
time: 6ms
memory: 3916kb

input:

15 3 1792
10 4 4
15 14 6
14 8 12
25 13 8 3 1 11 13 2 9 16 2 11 5 13 10 10 5 1 15 17 3 11 10 13 1 12
12 10 6 6 18 16 14 6 8 14 4 10 12
29 5 7 5 12 4 10 12 18 15 14 14 13 15 5 16 9 7 15 18 13 18 2 8 13 7 3 1 10 8
29 17 13 2 16 4 11 11 17 14 1 17 12 14 5 12 16 15 11 5 9 12 18 9 13 5 4 15 12 17
30 8 8 1...

output:

No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
...

result:

ok 1792 token(s): yes count is 1, no count is 1791

Test #83:

score: 0
Accepted
time: 16ms
memory: 4268kb

input:

312 30000 96
170 13 169
131 287 132
202 46 203
311 155 312
290 134 291
217 60 216
98 254 99
28 183 27
295 139 296
48 203 47
265 109 266
90 245 89
32 188 33
201 45 202
231 74 230
88 243 87
200 44 201
232 76 233
105 261 106
35 191 36
243 86 242
196 40 197
279 122 278
295 138 294
110 265 109
180 24 181...

output:

Yes
Yes
No
No
No
No
No
Yes
No
Yes
No
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
Yes
No
No
No
Yes
No
Yes
Yes
No
Yes
Yes
Yes
No
Yes
No
No
No
Yes
No
Yes
Yes
Yes
No
No
No
Yes
No
Yes
Yes
Yes
No
No
No
No
Yes
No
Yes
Yes
Yes
No
Yes
Yes
No
No
No
No
Yes
Yes
Yes
Yes
No
Yes
Yes
No
No
Yes
Yes
No
No
Yes
Yes
No
No
No
No
No
Ye...

result:

ok 96 token(s): yes count is 48, no count is 48

Test #84:

score: 0
Accepted
time: 21ms
memory: 4272kb

input:

312 30000 96
92 248 93
102 258 103
230 74 231
248 91 247
219 62 218
295 139 296
134 290 135
51 207 52
73 229 74
156 311 155
264 107 263
61 217 62
253 96 252
267 110 266
294 138 295
95 251 96
2 157 1
91 247 92
220 64 221
205 48 204
42 197 41
244 88 245
210 54 211
124 279 123
242 85 241
32 188 33
130 ...

output:

Yes
Yes
Yes
No
Yes
Yes
No
No
Yes
No
No
No
No
No
Yes
Yes
Yes
No
No
Yes
No
Yes
No
No
No
Yes
Yes
No
No
Yes
Yes
Yes
No
Yes
No
No
Yes
Yes
Yes
Yes
Yes
No
No
No
No
Yes
Yes
Yes
Yes
Yes
No
No
No
Yes
No
Yes
No
No
Yes
Yes
Yes
Yes
No
No
Yes
No
No
No
No
Yes
No
Yes
Yes
Yes
No
No
No
Yes
Yes
Yes
No
Yes
No
No
Yes
No...

result:

ok 96 token(s): yes count is 48, no count is 48

Test #85:

score: 0
Accepted
time: 17ms
memory: 4268kb

input:

312 30000 96
192 270 36
135 213 291
12 246 168
269 191 113
129 51 285
212 290 56
194 116 38
71 149 227
177 255 21
187 109 31
9 243 165
287 53 131
107 185 263
66 144 222
224 302 68
299 65 143
74 308 230
223 145 67
119 197 275
283 49 127
185 263 29
274 40 118
38 272 194
258 180 102
175 253 19
144 222 ...

output:

No
Yes
Yes
No
No
No
No
Yes
Yes
No
Yes
No
Yes
No
Yes
No
No
No
No
Yes
No
Yes
Yes
No
No
Yes
No
No
Yes
No
No
No
No
Yes
Yes
No
No
No
Yes
No
Yes
No
No
No
Yes
Yes
Yes
No
Yes
Yes
No
Yes
No
Yes
No
No
Yes
Yes
No
No
Yes
Yes
No
Yes
Yes
Yes
Yes
No
No
Yes
Yes
Yes
Yes
Yes
No
Yes
No
Yes
Yes
Yes
No
No
No
No
Yes
No
Y...

result:

ok 96 token(s): yes count is 48, no count is 48

Test #86:

score: 0
Accepted
time: 17ms
memory: 4112kb

input:

312 30000 96
156 78 312
175 253 19
38 272 194
225 303 69
37 271 193
76 310 232
64 142 220
55 289 211
311 77 155
256 178 100
91 169 247
177 255 21
201 279 45
261 183 105
50 284 206
147 69 303
75 309 231
283 205 127
42 120 198
84 6 240
164 86 8
229 307 73
12 90 168
51 285 207
154 232 310
236 158 80
26...

output:

Yes
Yes
No
No
No
No
No
No
No
No
No
No
No
No
No
No
Yes
Yes
No
Yes
Yes
No
No
No
Yes
No
Yes
Yes
Yes
No
Yes
Yes
Yes
Yes
Yes
No
No
Yes
No
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
Yes
No
Yes
No
Yes
Yes
Yes
No
No
Yes
Yes
Yes
No
No
Yes
No
Yes
No
No
Yes
No
Yes
No
Yes
No
Yes
Yes
Yes
No
Yes
No
No
No
No
No
Yes
No
No
Yes
...

result:

ok 96 token(s): yes count is 48, no count is 48

Test #87:

score: 0
Accepted
time: 23ms
memory: 4088kb

input:

311 30000 96
285 129 284
88 243 87
264 108 263
24 179 23
85 241 86
301 146 302
8 163 7
234 78 233
70 226 71
174 19 175
278 122 277
48 203 47
113 268 112
94 249 93
13 169 14
129 284 128
287 132 288
117 272 116
170 15 171
98 253 97
46 201 45
77 232 76
279 123 278
44 199 43
140 296 141
223 68 224
266 1...

output:

No
Yes
Yes
Yes
No
No
Yes
Yes
No
Yes
No
No
Yes
Yes
Yes
No
Yes
Yes
No
No
No
No
No
Yes
No
No
Yes
No
Yes
No
No
Yes
No
No
Yes
No
No
No
No
No
No
No
No
No
No
No
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
No
Yes
Yes
No
No
No
No
Yes
Yes
Yes
No
Yes
Yes
Yes
Yes
Yes
No
No
Yes
Yes
Yes
No
No
Yes
No
No
No
...

result:

ok 96 token(s): yes count is 48, no count is 48

Test #88:

score: 0
Accepted
time: 23ms
memory: 4116kb

input:

311 30000 96
126 282 127
138 293 137
227 72 228
307 152 308
26 182 27
223 67 222
259 104 260
77 233 78
125 281 126
79 234 78
2 157 1
201 46 202
180 25 181
156 311 155
135 290 134
46 202 47
32 188 33
45 201 46
109 264 108
198 42 197
107 262 106
197 41 196
51 207 52
296 140 295
288 132 287
201 45 200
...

output:

No
Yes
Yes
Yes
Yes
No
Yes
Yes
Yes
Yes
No
No
Yes
Yes
Yes
Yes
No
No
Yes
No
Yes
Yes
No
No
Yes
Yes
Yes
No
Yes
No
No
No
No
No
No
Yes
No
No
Yes
Yes
No
No
Yes
Yes
No
Yes
No
No
No
No
Yes
No
No
Yes
No
Yes
Yes
Yes
No
Yes
No
Yes
Yes
Yes
No
No
No
Yes
No
No
Yes
No
No
Yes
Yes
No
Yes
Yes
Yes
No
No
Yes
No
No
No
No
...

result:

ok 96 token(s): yes count is 48, no count is 48

Test #89:

score: 0
Accepted
time: 23ms
memory: 4168kb

input:

311 30000 96
106 183 260
126 203 280
52 129 206
15 92 169
98 21 255
287 210 133
76 310 233
59 136 213
63 140 217
239 5 82
282 205 128
186 263 29
185 108 31
56 290 213
152 75 309
142 219 296
11 245 168
301 67 144
57 291 214
66 300 223
269 192 115
88 11 245
257 180 103
113 36 270
228 305 71
255 178 10...

output:

Yes
No
Yes
No
Yes
Yes
Yes
Yes
Yes
No
No
No
No
Yes
Yes
No
No
No
Yes
No
No
Yes
Yes
Yes
No
No
Yes
No
No
No
Yes
No
No
No
Yes
No
No
Yes
No
No
Yes
Yes
Yes
Yes
No
Yes
Yes
Yes
No
No
No
No
No
Yes
Yes
No
No
Yes
Yes
Yes
Yes
Yes
No
Yes
Yes
No
Yes
No
No
Yes
No
Yes
No
Yes
No
Yes
Yes
No
No
Yes
No
Yes
Yes
No
No
Yes...

result:

ok 96 token(s): yes count is 48, no count is 48

Test #90:

score: 0
Accepted
time: 21ms
memory: 4116kb

input:

311 30000 96
264 30 107
56 133 210
32 266 189
66 143 220
310 76 153
154 77 311
284 50 127
135 58 292
115 192 269
242 8 85
91 14 248
99 22 256
79 156 233
108 185 262
188 265 31
99 176 253
278 44 121
132 55 289
299 65 142
62 296 219
298 221 144
234 157 80
253 19 96
52 286 209
150 73 307
32 109 186
75 ...

output:

Yes
Yes
No
Yes
No
No
No
No
No
Yes
Yes
No
Yes
No
Yes
Yes
No
Yes
No
No
Yes
Yes
Yes
Yes
Yes
No
Yes
No
No
Yes
Yes
Yes
Yes
No
No
Yes
Yes
No
Yes
No
Yes
No
No
No
No
Yes
No
No
Yes
Yes
No
No
Yes
Yes
No
Yes
Yes
Yes
No
No
No
No
No
Yes
No
No
Yes
No
No
Yes
No
Yes
No
No
No
No
Yes
No
Yes
No
No
Yes
Yes
No
No
Yes
Ye...

result:

ok 96 token(s): yes count is 48, no count is 48

Test #91:

score: 0
Accepted
time: 19ms
memory: 4096kb

input:

625 30000 48
115 428 116
305 617 304
116 429 117
314 1 313
545 232 544
535 223 536
409 97 410
297 610 298
353 40 352
141 453 140
406 93 405
624 312 625
30 343 31
498 185 497
400 88 401
593 280 592
425 112 424
526 214 527
589 277 590
453 141 454
108 421 109
128 441 129
220 533 221
55 367 54
621 308 6...

output:

No
Yes
Yes
Yes
No
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
Yes
No
No
No
No
No
Yes
No
Yes
Yes
No
No
No
Yes
No
Yes
Yes
Yes
No
No
No
Yes
No
No
No
Yes
No
No
No
No
Yes
No
Yes

result:

ok 48 token(s): yes count is 24, no count is 24

Test #92:

score: 0
Accepted
time: 23ms
memory: 4172kb

input:

625 30000 48
147 460 148
37 350 38
56 368 55
101 414 102
361 48 360
497 184 496
315 2 314
271 584 272
420 108 421
565 252 564
416 103 415
226 539 227
497 185 498
429 116 428
94 407 95
243 556 244
343 31 344
580 267 579
321 8 320
120 433 121
473 160 472
208 520 207
211 524 212
420 107 419
157 470 158...

output:

No
Yes
No
Yes
No
Yes
Yes
No
No
Yes
No
No
Yes
Yes
No
Yes
Yes
No
No
Yes
Yes
Yes
Yes
No
Yes
No
Yes
No
No
Yes
No
Yes
No
No
No
No
Yes
Yes
Yes
Yes
Yes
Yes
No
No
No
No
Yes
No

result:

ok 48 token(s): yes count is 24, no count is 24

Test #93:

score: 0
Accepted
time: 23ms
memory: 4096kb

input:

625 30000 48
443 599 130
166 10 479
177 333 489
470 314 158
67 536 380
562 93 249
314 470 1
314 158 2
402 246 90
283 127 596
470 1 157
279 123 592
328 484 15
39 195 351
292 136 605
408 564 95
301 457 613
339 495 26
36 505 349
320 476 7
334 178 22
191 347 503
75 231 387
60 529 373
255 99 568
317 161 ...

output:

No
No
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
Yes
No
Yes
No
No
Yes
No
Yes
Yes
Yes
No
Yes
Yes
No
Yes
No
No
Yes
Yes
No
No
No
No
No
No
Yes
Yes
No
No
No
Yes
Yes
No
Yes
Yes
No
No
No

result:

ok 48 token(s): yes count is 24, no count is 24

Test #94:

score: 0
Accepted
time: 24ms
memory: 4164kb

input:

625 30000 48
18 487 331
136 292 448
4 473 317
523 54 210
401 245 89
249 93 562
65 534 378
449 293 137
99 568 412
549 393 237
441 597 128
486 330 174
190 346 502
325 481 12
390 234 78
13 169 325
479 323 167
391 547 78
577 108 264
369 525 56
117 273 429
244 400 556
53 209 365
226 70 539
607 451 295
42...

output:

No
No
Yes
No
No
No
Yes
Yes
No
No
No
No
No
No
Yes
No
Yes
Yes
Yes
No
Yes
Yes
Yes
Yes
No
Yes
No
No
No
No
No
No
Yes
Yes
Yes
Yes
No
Yes
Yes
Yes
No
No
Yes
Yes
Yes
No
Yes
Yes

result:

ok 48 token(s): yes count is 24, no count is 24

Test #95:

score: 0
Accepted
time: 23ms
memory: 4140kb

input:

624 30000 48
284 596 285
218 530 219
339 26 338
60 371 59
29 341 30
559 247 560
491 179 492
74 385 73
582 270 583
122 434 123
153 465 154
174 486 175
74 386 75
444 131 443
64 376 65
273 584 272
33 345 34
553 241 554
518 205 517
15 327 16
254 565 253
539 227 540
502 190 503
573 260 572
23 335 24
115 ...

output:

Yes
Yes
Yes
No
Yes
Yes
Yes
No
Yes
No
No
Yes
No
No
No
No
Yes
Yes
Yes
No
No
Yes
Yes
No
No
Yes
No
No
No
Yes
No
No
Yes
No
Yes
No
Yes
No
No
No
Yes
No
Yes
No
Yes
Yes
Yes
Yes

result:

ok 48 token(s): yes count is 24, no count is 24

Test #96:

score: 0
Accepted
time: 18ms
memory: 4248kb

input:

624 30000 48
111 422 110
260 571 259
31 343 32
135 446 134
329 16 328
68 379 67
75 387 76
133 444 132
40 352 41
122 434 123
135 447 136
480 167 479
178 490 179
99 410 98
608 295 607
519 207 520
525 213 526
176 488 177
465 153 466
87 399 88
137 449 138
149 460 148
289 600 288
251 562 250
474 162 475
...

output:

No
Yes
Yes
No
Yes
Yes
No
Yes
No
Yes
Yes
Yes
Yes
No
No
No
No
No
No
Yes
No
Yes
No
Yes
Yes
No
Yes
No
No
No
No
Yes
No
Yes
Yes
No
Yes
Yes
No
Yes
No
Yes
No
Yes
No
Yes
Yes
No

result:

ok 48 token(s): yes count is 24, no count is 24

Test #97:

score: 0
Accepted
time: 20ms
memory: 4208kb

input:

624 30000 48
220 376 532
219 63 531
254 98 566
88 556 400
524 56 212
156 624 468
311 467 623
41 509 353
606 450 294
181 337 493
444 600 132
137 293 449
2 470 314
280 124 592
298 454 610
397 553 85
150 618 462
603 447 291
41 197 353
601 133 289
198 354 510
28 184 340
189 345 501
369 213 57
202 358 51...

output:

No
Yes
Yes
Yes
Yes
Yes
No
No
No
Yes
No
No
Yes
No
No
Yes
No
No
Yes
No
No
Yes
Yes
No
Yes
No
No
Yes
No
Yes
Yes
No
Yes
No
No
Yes
Yes
Yes
No
Yes
No
Yes
No
Yes
Yes
No
Yes
No

result:

ok 48 token(s): yes count is 24, no count is 24

Test #98:

score: 0
Accepted
time: 20ms
memory: 4164kb

input:

624 30000 48
184 340 496
112 580 424
155 311 467
301 145 613
79 547 391
516 48 204
385 229 73
215 59 527
485 329 173
383 539 71
301 457 613
3 471 315
39 507 351
153 621 465
273 117 585
182 338 494
366 522 54
414 258 102
466 622 154
482 14 170
143 299 455
419 575 107
393 237 81
74 542 386
353 197 41
...

output:

Yes
No
Yes
No
Yes
No
Yes
Yes
No
No
Yes
Yes
Yes
No
No
No
No
Yes
Yes
No
No
Yes
Yes
No
Yes
Yes
No
No
Yes
No
Yes
Yes
No
No
Yes
No
Yes
No
No
Yes
No
No
Yes
Yes
Yes
No
Yes
No

result:

ok 48 token(s): yes count is 24, no count is 24

Test #99:

score: 0
Accepted
time: 25ms
memory: 4396kb

input:

1250 30000 24
1207 582 1208
857 232 858
696 71 697
951 326 952
632 7 633
761 135 760
1198 572 1197
410 1034 409
385 1010 386
268 893 269
260 884 259
751 125 750
1054 429 1055
742 117 743
679 54 680
1156 531 1157
648 22 647
603 1227 602
424 1048 423
725 100 726
142 766 141
773 148 774
730 104 729
212...

output:

Yes
Yes
Yes
No
No
Yes
Yes
Yes
Yes
No
No
Yes
No
No
No
No
No
Yes
No
Yes
No
Yes
Yes
No

result:

ok 24 token(s): yes count is 12, no count is 12

Test #100:

score: 0
Accepted
time: 25ms
memory: 4360kb

input:

1250 30000 24
412 1037 413
124 748 123
794 168 793
608 1233 609
91 715 90
404 1028 403
47 671 46
283 907 282
794 169 795
1245 619 1244
1123 497 1122
757 131 756
174 799 175
1030 405 1031
118 743 119
672 46 671
531 1155 530
678 52 677
306 930 305
282 906 281
1027 401 1026
590 1215 591
132 757 133
110...

output:

Yes
No
Yes
Yes
No
Yes
Yes
No
No
Yes
No
No
No
Yes
Yes
No
No
Yes
Yes
No
Yes
No
No
Yes

result:

ok 24 token(s): yes count is 12, no count is 12

Test #101:

score: 0
Accepted
time: 25ms
memory: 4356kb

input:

1250 30000 24
1243 931 619
859 547 235
1085 147 459
264 576 888
596 908 1220
404 716 1028
693 381 69
503 191 1129
834 1146 208
768 1080 142
967 655 343
532 844 1156
294 606 918
740 428 116
159 1097 785
966 28 340
973 661 349
981 669 357
287 1225 913
149 1087 775
792 1104 166
631 943 5
597 285 1223
1...

output:

Yes
No
No
No
No
No
No
Yes
No
Yes
Yes
Yes
No
No
Yes
Yes
Yes
No
Yes
Yes
Yes
No
Yes
No

result:

ok 24 token(s): yes count is 12, no count is 12

Test #102:

score: 0
Accepted
time: 22ms
memory: 4288kb

input:

1250 30000 24
175 487 799
624 936 1248
1011 73 385
1217 279 591
1218 906 594
534 846 1158
824 512 200
867 555 243
64 376 688
1041 729 417
622 310 1248
179 491 803
1027 89 401
1096 784 472
997 685 373
873 1185 247
491 179 1117
328 16 954
463 775 1087
1091 779 467
323 635 947
597 909 1221
985 673 361
...

output:

No
No
No
No
Yes
No
Yes
Yes
No
Yes
No
No
No
Yes
Yes
Yes
No
Yes
Yes
Yes
Yes
No
No
Yes

result:

ok 24 token(s): yes count is 12, no count is 12

Test #103:

score: 0
Accepted
time: 25ms
memory: 4352kb

input:

1249 30000 24
364 989 365
777 152 776
4 629 5
219 844 220
1030 406 1031
356 980 355
804 180 805
170 795 171
1079 455 1080
419 1043 418
154 778 153
1052 427 1051
120 745 121
1221 596 1220
1110 485 1109
601 1225 600
1000 375 999
809 185 810
1145 520 1144
1217 592 1216
1232 608 1233
1070 446 1071
628 4...

output:

No
Yes
Yes
Yes
No
Yes
No
No
No
No
Yes
Yes
Yes
Yes
Yes
No
Yes
No
No
No
Yes
Yes
No
No

result:

ok 24 token(s): yes count is 12, no count is 12

Test #104:

score: 0
Accepted
time: 25ms
memory: 4360kb

input:

1249 30000 24
674 50 675
612 1236 611
220 845 221
642 18 643
597 1222 598
857 233 858
369 994 370
1066 441 1065
1005 381 1006
1152 527 1151
562 1187 563
628 4 629
754 130 755
432 1057 433
50 674 49
1173 549 1174
390 1015 391
437 1062 438
337 961 336
86 711 87
912 287 911
920 295 919
123 748 124
280 ...

output:

No
No
Yes
Yes
No
Yes
No
Yes
No
No
Yes
No
No
Yes
Yes
No
Yes
Yes
No
Yes
Yes
No
Yes
No

result:

ok 24 token(s): yes count is 12, no count is 12

Test #105:

score: 0
Accepted
time: 26ms
memory: 4284kb

input:

1249 30000 24
579 891 1203
825 1137 200
986 674 362
374 62 999
382 694 1006
1018 81 393
812 500 188
452 140 1077
214 1151 839
114 426 738
142 454 766
1171 859 547
920 608 296
624 312 1249
306 1243 931
1157 845 533
821 1133 196
246 1183 871
179 1116 804
29 966 654
281 1218 906
278 1215 903
1046 734 4...

output:

No
No
Yes
Yes
No
Yes
No
Yes
Yes
No
No
No
Yes
Yes
Yes
No
Yes
No
No
No
Yes
Yes
Yes
No

result:

ok 24 token(s): yes count is 12, no count is 12

Test #106:

score: 0
Accepted
time: 29ms
memory: 4340kb

input:

1249 30000 24
760 448 136
977 40 352
660 972 35
1243 306 618
42 979 667
1084 772 460
522 210 1147
967 655 343
912 600 288
1239 302 614
477 165 1102
327 639 951
505 193 1130
263 1200 888
97 409 721
1101 789 477
449 761 1073
187 1124 812
634 946 9
791 479 167
892 1204 267
1002 65 377
1108 796 484
498 ...

output:

No
No
No
No
Yes
Yes
No
Yes
No
Yes
No
Yes
Yes
Yes
No
No
Yes
Yes
Yes
Yes
Yes
No
No
No

result:

ok 24 token(s): yes count is 12, no count is 12

Test #107:

score: 0
Accepted
time: 28ms
memory: 4464kb

input:

2500 30000 12
314 1563 313
732 1982 733
2354 1104 2355
132 1381 131
1747 497 1748
1784 534 1785
1834 584 1835
2461 1211 2462
2275 1024 2274
1065 2314 1064
1605 355 1606
2336 1085 2335
1712 462 1713
438 1688 439
1025 2275 1026
131 1380 130
1739 489 1740
1295 44 1294
1102 2351 1101
1859 609 1860
2088 ...

output:

No
Yes
No
No
No
No
No
Yes
Yes
Yes
Yes
Yes

result:

ok 12 token(s): yes count is 6, no count is 6

Test #108:

score: 0
Accepted
time: 27ms
memory: 4360kb

input:

2500 30000 12
951 2201 952
499 1748 498
2005 754 2004
112 1362 113
1228 2477 1227
1687 437 1688
2422 1172 2423
1451 200 1450
2102 851 2101
408 1657 407
2300 1049 2299
2443 1193 2444
2267 1017 2268
1889 639 1890
391 1640 390
22 1272 23
2489 1238 2488
224 1474 225
1884 633 1883
1792 541 1791
1953 703 ...

output:

Yes
Yes
No
Yes
No
Yes
No
Yes
No
Yes
No
No

result:

ok 12 token(s): yes count is 6, no count is 6

Test #109:

score: 0
Accepted
time: 26ms
memory: 4316kb

input:

2500 30000 12
1467 2092 217
991 366 2241
2026 1401 776
835 1460 2085
1520 895 270
1686 1061 436
463 1088 1713
1013 388 2263
220 845 1470
594 2469 1844
2095 1470 845
1302 677 52
1109 484 2359
1571 2196 321
275 2150 1525
2231 1606 981
818 193 2068
2130 255 880
844 1469 2094
1163 538 2413
2143 268 893
...

output:

No
No
Yes
No
Yes
Yes
Yes
No
No
No
Yes
Yes

result:

ok 12 token(s): yes count is 6, no count is 6

Test #110:

score: 0
Accepted
time: 26ms
memory: 4316kb

input:

2500 30000 12
1464 839 214
1825 2450 575
1643 2268 393
532 2407 1782
61 686 1311
2383 1758 1133
870 1495 2120
1797 2422 547
1307 1932 57
1744 2369 494
1202 577 2452
1795 2420 545
546 2421 1796
2163 1538 913
2475 1850 1225
1374 749 124
516 1141 1766
481 2356 1731
1581 2206 331
1001 376 2251
432 1057 ...

output:

Yes
No
Yes
Yes
No
Yes
No
No
Yes
Yes
No
No

result:

ok 12 token(s): yes count is 6, no count is 6

Test #111:

score: 0
Accepted
time: 27ms
memory: 4336kb

input:

2499 30000 12
1575 325 1574
2405 1156 2406
552 1801 551
1146 2396 1147
695 1944 694
1336 86 1335
2388 1139 2389
1704 454 1703
1476 227 1477
259 1509 260
2124 874 2123
2486 1236 2485
1530 280 1529
1336 87 1337
918 2168 919
740 1989 739
113 1363 114
1665 416 1666
468 1717 467
954 2203 953
83 1333 84
2...

output:

No
Yes
No
No
No
Yes
No
Yes
Yes
No
Yes
Yes

result:

ok 12 token(s): yes count is 6, no count is 6

Test #112:

score: 0
Accepted
time: 27ms
memory: 4340kb

input:

2499 30000 12
1945 696 1946
260 1509 259
1913 663 1912
1617 368 1618
275 1524 274
1611 361 1610
1522 273 1523
1949 700 1950
2097 848 2098
1419 170 1420
977 2226 976
2194 945 2195
2234 984 2233
712 1961 711
1848 598 1847
691 1941 692
796 2046 797
533 1783 534
260 1510 261
1934 685 1935
223 1472 222
3...

output:

Yes
No
Yes
No
Yes
No
No
Yes
Yes
No
Yes
No

result:

ok 12 token(s): yes count is 6, no count is 6

Test #113:

score: 0
Accepted
time: 27ms
memory: 4404kb

input:

2499 30000 12
2171 1547 923
576 1200 1824
2426 551 1175
465 2340 1716
1462 838 214
313 937 1561
1437 2061 186
1216 1840 2464
723 1347 1971
1248 1872 2496
2238 363 987
2288 1664 1040
761 1385 2009
1614 2238 363
810 186 2061
45 1920 1296
1198 1822 2446
983 1607 2231
699 1323 1947
1950 1326 702
1846 12...

output:

No
Yes
No
Yes
No
No
No
Yes
Yes
No
Yes
Yes

result:

ok 12 token(s): yes count is 6, no count is 6

Test #114:

score: 0
Accepted
time: 27ms
memory: 4452kb

input:

2499 30000 12
886 1510 2134
2373 498 1122
1836 2460 585
719 95 1970
1642 1018 394
1251 1875 2499
1974 99 723
1290 1914 39
231 855 1479
1203 1827 2451
168 792 1416
742 1366 1990
2230 355 979
171 795 1419
1965 90 714
610 2485 1861
2407 532 1156
1851 2475 600
1415 791 167
1523 899 275
1920 1296 672
116...

output:

No
Yes
No
Yes
Yes
No
Yes
No
No
Yes
Yes
No

result:

ok 12 token(s): yes count is 6, no count is 6

Test #115:

score: 0
Accepted
time: 29ms
memory: 4212kb

input:

5000 30000 6
2402 4902 2403
4089 1588 4088
2935 435 2936
733 3233 734
262 2761 261
2889 388 2888
772 3271 771
4389 1888 4388
3573 1072 3572
2236 4736 2237
4180 1679 4179
3848 1348 3849
4685 2185 4686
992 3492 993
4883 2383 4884
2039 4538 2038
3570 1069 3569
4037 1537 4038
2324 4823 2323
565 3065 566...

output:

Yes
No
Yes
No
No
Yes

result:

ok 6 token(s): yes count is 3, no count is 3

Test #116:

score: 0
Accepted
time: 29ms
memory: 4240kb

input:

5000 30000 6
4697 2196 4696
142 2642 143
2660 159 2659
307 2807 308
4169 1668 4168
3956 1455 3955
969 3469 970
3088 587 3087
2138 4638 2139
3092 592 3093
1614 4113 1613
3170 670 3171
3928 1428 3929
2683 183 2684
3029 528 3028
76 2575 75
1834 4334 1835
4080 1579 4079
1818 4317 1817
1746 4246 1747
111...

output:

Yes
Yes
No
Yes
No
No

result:

ok 6 token(s): yes count is 3, no count is 3

Test #117:

score: 0
Accepted
time: 29ms
memory: 4156kb

input:

5000 30000 6
328 1578 2828
4455 3205 1955
762 4512 3262
2670 1420 170
805 2055 3305
2163 3413 4663
773 2023 3273
4298 548 1798
2788 4038 288
351 1601 2851
4125 375 1625
4342 3092 1842
3057 4307 557
4522 3272 2022
2644 1394 144
3891 141 1391
437 1687 2937
104 1354 2604
3385 4635 885
4801 3551 2301
40...

output:

No
Yes
Yes
Yes
No
No

result:

ok 6 token(s): yes count is 3, no count is 3

Test #118:

score: 0
Accepted
time: 26ms
memory: 4208kb

input:

5000 30000 6
1091 4841 3591
3062 1812 562
1095 2345 3595
506 4256 3006
4183 433 1683
4473 723 1973
3078 1828 578
312 1562 2812
2852 1602 352
3491 4741 991
929 2179 3429
1003 4753 3503
4641 891 2141
4874 3624 2374
1575 2825 4075
928 2178 3428
1784 534 4284
2966 1716 466
1466 2716 3966
1751 501 4251
3...

output:

No
Yes
No
Yes
No
Yes

result:

ok 6 token(s): yes count is 3, no count is 3

Test #119:

score: 0
Accepted
time: 29ms
memory: 4324kb

input:

4999 30000 6
2907 408 2908
3866 1366 3865
2310 4810 2311
3747 1247 3746
1687 4187 1688
2667 168 2668
2760 260 2759
4875 2375 4874
4182 1682 4181
4453 1954 4454
2949 449 2948
710 3209 709
4009 1509 4008
4892 2393 4893
630 3129 629
3293 793 3292
893 3392 892
4385 1885 4384
4881 2381 4880
3946 1447 394...

output:

Yes
Yes
Yes
No
No
No

result:

ok 6 token(s): yes count is 3, no count is 3

Test #120:

score: 0
Accepted
time: 22ms
memory: 4340kb

input:

4999 30000 6
2480 4979 2479
3788 1289 3789
2651 152 2652
3517 1017 3516
4009 1509 4008
505 3005 506
4901 2401 4900
714 3213 713
3418 918 3417
29 2529 30
4893 2393 4892
1560 4059 1559
3736 1236 3735
2374 4874 2375
4191 1692 4192
1501 4001 1502
330 2830 331
276 2776 277
4708 2208 4707
2867 367 2866
40...

output:

No
Yes
Yes
Yes
No
No

result:

ok 6 token(s): yes count is 3, no count is 3

Test #121:

score: 0
Accepted
time: 26ms
memory: 4340kb

input:

4999 30000 6
2244 3493 4742
2829 4078 328
2967 1718 469
217 1466 2715
1542 293 4043
771 4521 3272
1244 4994 3745
306 4056 2807
2205 956 4706
634 4384 3135
2774 4023 273
4661 911 2160
3531 4780 1030
2306 3555 4804
1189 4939 3690
4178 428 1677
3155 4404 654
465 1714 2963
3882 132 1381
107 1356 2605
35...

output:

No
No
Yes
Yes
No
Yes

result:

ok 6 token(s): yes count is 3, no count is 3

Test #122:

score: 0
Accepted
time: 29ms
memory: 4340kb

input:

4999 30000 6
3406 4655 905
1360 111 3861
696 1945 3194
4345 3096 1847
396 1645 2894
991 2240 3489
4456 3207 1958
2064 815 4565
1212 4962 3713
296 4046 2797
1632 2881 4130
24 1273 2522
4136 386 1635
4728 978 2227
3874 124 1373
1580 331 4081
2947 1698 449
462 1711 2960
998 2247 3496
29 3779 2530
3622 ...

output:

No
Yes
Yes
Yes
No
No

result:

ok 6 token(s): yes count is 3, no count is 3

Test #123:

score: 0
Accepted
time: 34ms
memory: 4348kb

input:

10000 30000 3
7998 2997 7997
9696 4696 9697
5173 172 5172
9934 4933 9933
7596 2596 7597
4818 9817 4817
9197 4197 9198
7840 2840 7841
4745 9744 4744
5719 718 5718
5611 611 5612
5272 271 5271
4725 9724 4724
7665 2664 7664
3780 8780 3781
1972 6971 1971
212 5211 211
677 5676 676
3029 8029 3030
2302 7302...

output:

Yes
No
Yes

result:

ok 3 token(s): yes count is 2, no count is 1

Test #124:

score: 0
Accepted
time: 26ms
memory: 4228kb

input:

10000 30000 3
5247 246 5246
6775 1775 6776
6947 1946 6946
6647 1646 6646
2115 7115 2116
9889 4889 9890
8550 3549 8549
6795 1794 6794
8647 3646 8646
4428 9427 4427
1148 6148 1149
8909 3909 8910
2933 7932 2932
7137 2136 7136
9033 4033 9034
6568 1568 6569
6570 1570 6571
2525 7524 2524
4230 9230 4231
15...

output:

No
Yes
No

result:

ok 3 token(s): yes count is 1, no count is 2

Test #125:

score: 0
Accepted
time: 33ms
memory: 4348kb

input:

10000 30000 3
5079 2579 79
2414 4914 7414
6035 3535 1035
1874 9374 6874
3963 6463 8963
2607 5107 7607
966 8466 5966
3829 6329 8829
7465 4965 2465
5696 8196 696
5517 3017 517
6828 9328 1828
7382 4882 2382
4689 2189 9689
604 8104 5604
6656 4156 1656
7643 143 2643
5722 8222 722
1699 9199 6699
3429 5929...

output:

Yes
No
Yes

result:

ok 3 token(s): yes count is 2, no count is 1

Test #126:

score: 0
Accepted
time: 29ms
memory: 4180kb

input:

10000 30000 3
2419 4919 7419
4341 6841 9341
5922 8422 922
6151 3651 1151
6055 3555 1055
9958 7458 4958
3227 5727 8227
8869 6369 3869
1649 9149 6649
9465 6965 4465
1654 9154 6654
3602 6102 8602
5811 3311 811
6990 4490 1990
44 7544 5044
532 3032 5532
8890 6390 3890
8573 1073 3573
3756 1256 8756
2901 5...

output:

No
No
Yes

result:

ok 3 token(s): yes count is 1, no count is 2

Test #127:

score: 0
Accepted
time: 35ms
memory: 4164kb

input:

9999 30000 3
3764 8763 3763
7434 2434 7433
6371 1371 6370
8604 3605 8605
2453 7453 2454
190 5189 189
8929 3929 8928
1169 6168 1168
709 5708 708
6519 1520 6520
5637 638 5638
8333 3334 8334
4959 9958 4958
9319 4320 9320
3365 8364 3364
934 5933 933
568 5568 569
2718 7718 2719
7362 2362 7361
4165 9164 4...

output:

No
Yes
Yes

result:

ok 3 token(s): yes count is 2, no count is 1

Test #128:

score: 0
Accepted
time: 29ms
memory: 4160kb

input:

9999 30000 3
1747 6746 1746
9702 4702 9701
3602 8601 3601
6918 1919 6919
2150 7149 2149
4062 9061 4061
1399 6398 1398
3410 8409 3409
3639 8638 3638
7287 2288 7288
6713 1713 6712
7948 2948 7947
2251 7250 2250
9585 4586 9586
1550 6549 1549
9438 4439 9439
957 5957 958
311 5311 312
2183 7183 2184
765 57...

output:

No
No
Yes

result:

ok 3 token(s): yes count is 1, no count is 2

Test #129:

score: 0
Accepted
time: 35ms
memory: 4220kb

input:

9999 30000 3
7347 9846 2346
3442 5941 8440
4219 6718 9217
9315 1815 4314
5881 8380 880
1224 8724 6225
4053 6552 9051
1977 9477 6978
2724 5223 7722
9274 6775 4276
1893 9393 6894
2923 5422 7921
5213 7712 212
5993 3494 995
9797 7298 4799
62 7562 5063
4421 1922 9422
1405 3904 6403
2372 9872 7373
4054 15...

output:

Yes
No
Yes

result:

ok 3 token(s): yes count is 2, no count is 1

Test #130:

score: 0
Accepted
time: 29ms
memory: 4216kb

input:

9999 30000 3
9322 1822 4321
3278 779 8279
3232 5731 8230
6614 9113 1613
3437 938 8438
5689 3190 691
9138 1638 4137
327 2826 5325
7088 9587 2087
6464 3965 1466
3117 5616 8115
6057 8556 1056
3 2502 5001
8700 6201 3702
1338 3837 6336
3125 5624 8123
4930 2431 9931
8692 6193 3694
9003 6504 4005
8875 6376...

output:

No
No
Yes

result:

ok 3 token(s): yes count is 1, no count is 2

Test #131:

score: 0
Accepted
time: 9ms
memory: 4516kb

input:

5 30000 6000
1 4 2
5 3 1
3 5 2
3 1 4
5 2 4
6 9 7
8 10 6
10 8 7
10 6 9
8 7 9
13 15 11
12 14 11
12 13 15
15 11 14
14 12 13
17 19 16
17 20 18
18 16 19
16 18 20
19 17 20
25 21 23
21 23 24
25 22 24
22 24 23
22 25 21
26 30 28
27 29 28
30 26 27
26 27 29
29 28 30
35 32 34
33 31 35
31 33 34
32 34 33
32 35 31...

output:

Yes
Yes
No
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
Yes
Yes
No
No
Yes
No
No
Yes
Yes
No
Yes
Yes
Yes
No
Yes
Yes
No
No
No
Yes
Yes
No
No
Yes
No
No
No
No
Yes
No
No
No
No
No
No
Yes
Yes
Yes
Yes
Yes
Yes
No
Yes
Yes
Yes
No
Yes
No
No
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
Yes
Yes
No
No
Yes
No
Yes
Yes
Yes
Yes
No
No
Y...

result:

ok 6000 token(s): yes count is 3000, no count is 3000

Test #132:

score: 0
Accepted
time: 13ms
memory: 4408kb

input:

7 30000 4285
7 3 6
3 6 2
5 2 6
5 1 4
2 5 1
7 4 1
3 7 4
10 9 8
14 8 9
11 13 14
13 14 8
12 10 9
11 12 10
12 11 13
16 18 17
18 16 15
19 20 21
21 17 18
15 19 20
19 15 16
17 21 20
26 27 23
24 28 25
28 25 22
27 23 22
23 22 25
28 24 26
24 26 27
34 30 31
32 33 31
35 29 32
30 31 33
33 32 29
29 35 34
35 34 30...

output:

Yes
Yes
No
Yes
Yes
No
No
Yes
Yes
Yes
No
No
Yes
No
Yes
Yes
Yes
No
Yes
Yes
No
Yes
No
Yes
No
No
No
Yes
Yes
Yes
Yes
No
Yes
No
Yes
Yes
No
No
No
Yes
Yes
No
No
Yes
Yes
Yes
No
No
No
No
No
Yes
No
Yes
Yes
Yes
Yes
No
No
No
No
No
Yes
Yes
No
Yes
Yes
Yes
Yes
No
No
Yes
No
Yes
No
Yes
No
No
Yes
Yes
No
Yes
Yes
No
No
...

result:

ok 4285 token(s): yes count is 2143, no count is 2142

Test #133:

score: 0
Accepted
time: 9ms
memory: 4540kb

input:

5 30000 6000
4 1 3
2 5 3
5 3 1
2 4 1
5 2 4
10 9 6
7 10 9
8 7 10
8 6 9
7 8 6
11 14 15
11 12 13
15 13 12
14 11 12
14 15 13
19 17 18
18 20 16
19 16 20
17 18 20
17 19 16
22 23 25
24 21 25
22 24 21
21 25 23
23 22 24
28 30 26
29 27 28
30 26 29
26 29 27
30 28 27
34 32 35
33 31 35
31 35 32
32 34 33
34 33 31...

output:

No
Yes
No
No
Yes
Yes
No
Yes
Yes
Yes
No
Yes
Yes
No
No
No
Yes
No
No
No
No
No
Yes
Yes
No
Yes
Yes
Yes
No
Yes
No
No
No
No
No
No
No
Yes
Yes
No
Yes
No
Yes
No
Yes
No
No
No
No
No
Yes
No
No
Yes
Yes
Yes
No
No
Yes
Yes
No
Yes
No
Yes
No
No
No
Yes
Yes
No
Yes
Yes
Yes
No
Yes
No
No
Yes
No
No
Yes
Yes
No
Yes
No
Yes
Yes...

result:

ok 6000 token(s): yes count is 3000, no count is 3000

Test #134:

score: 0
Accepted
time: 12ms
memory: 4532kb

input:

7 30000 4285
3 7 4
6 3 7
3 6 2
2 5 1
5 2 6
4 1 5
7 4 1
9 8 14
13 14 8
9 10 12
14 13 11
11 12 10
12 11 13
8 9 10
19 17 21
17 19 20
18 20 19
16 15 21
16 18 20
15 21 17
15 16 18
22 23 24
23 24 26
22 27 25
24 26 28
23 22 27
28 25 27
26 28 25
29 30 32
32 35 34
35 32 30
31 33 29
33 31 34
30 29 33
35 34 31...

output:

No
No
No
Yes
No
Yes
Yes
No
No
No
Yes
No
No
Yes
Yes
No
No
Yes
No
Yes
No
Yes
Yes
Yes
No
No
Yes
Yes
No
No
Yes
No
No
No
Yes
No
Yes
Yes
Yes
Yes
No
Yes
Yes
Yes
Yes
Yes
No
Yes
No
No
Yes
No
Yes
No
No
Yes
Yes
No
Yes
Yes
Yes
No
No
Yes
Yes
Yes
No
No
No
Yes
Yes
Yes
Yes
No
Yes
No
Yes
No
Yes
No
Yes
No
Yes
No
No
N...

result:

ok 4285 token(s): yes count is 2142, no count is 2143

Test #135:

score: 0
Accepted
time: 13ms
memory: 4628kb

input:

5 30000 6000
5 4 3
3 2 1
2 1 5
4 5 1
4 3 2
7 8 9
10 6 9
6 9 8
10 7 8
7 10 6
15 14 11
14 11 13
13 12 15
14 15 12
12 13 11
17 20 18
19 18 20
18 19 16
16 17 20
19 16 17
25 23 22
21 24 25
21 22 23
24 21 22
24 25 23
27 30 26
29 28 26
28 29 27
30 26 28
30 27 29
32 33 35
32 34 31
34 32 33
35 31 34
31 35 33...

output:

No
No
Yes
No
Yes
Yes
Yes
Yes
No
No
No
Yes
No
No
No
No
Yes
No
Yes
No
No
Yes
No
Yes
No
Yes
No
No
No
No
No
No
Yes
No
Yes
No
No
Yes
No
No
No
No
Yes
No
No
Yes
No
Yes
No
Yes
No
No
No
No
No
No
No
Yes
No
Yes
Yes
No
No
No
No
No
No
Yes
Yes
No
Yes
No
No
No
No
Yes
Yes
Yes
Yes
No
No
Yes
Yes
No
No
Yes
Yes
No
Yes
...

result:

ok 6000 token(s): yes count is 3000, no count is 3000

Test #136:

score: 0
Accepted
time: 9ms
memory: 4516kb

input:

7 30000 4285
7 6 5
1 7 6
2 3 4
1 2 3
7 1 2
6 5 4
3 4 5
8 9 12
12 11 10
9 8 13
13 14 10
14 13 8
11 10 14
9 12 11
16 20 18
19 18 20
20 16 21
16 21 15
15 17 19
18 19 17
21 15 17
27 26 28
24 22 23
25 28 26
28 25 24
26 27 23
27 23 22
25 24 22
33 29 31
35 32 31
32 31 29
29 33 34
30 34 33
34 30 35
32 35 30...

output:

No
No
No
No
No
Yes
Yes
Yes
Yes
No
No
No
Yes
No
No
No
Yes
No
Yes
No
Yes
No
Yes
Yes
No
No
No
No
Yes
Yes
No
No
No
No
No
Yes
Yes
No
Yes
No
Yes
No
No
No
No
No
No
Yes
Yes
Yes
No
Yes
No
No
Yes
Yes
Yes
Yes
Yes
No
Yes
Yes
Yes
Yes
No
No
Yes
No
No
No
Yes
No
Yes
Yes
Yes
No
No
Yes
Yes
Yes
No
Yes
No
Yes
No
Yes
No...

result:

ok 4285 token(s): yes count is 2143, no count is 2142

Test #137:

score: 0
Accepted
time: 13ms
memory: 4576kb

input:

5 30000 6000
3 4 5
2 3 4
4 5 1
2 1 5
1 2 3
6 7 10
8 9 10
9 8 6
9 10 7
7 6 8
14 11 15
13 12 14
12 14 11
12 13 15
13 15 11
20 19 17
16 20 19
16 18 17
19 17 18
20 16 18
21 24 23
23 25 22
25 22 21
24 23 25
24 21 22
27 28 30
26 29 27
26 30 28
29 27 28
29 26 30
34 31 33
35 33 31
35 32 34
31 34 32
33 35 32...

output:

No
Yes
No
Yes
Yes
No
No
Yes
No
No
No
No
Yes
No
Yes
No
No
Yes
No
Yes
Yes
Yes
Yes
No
No
Yes
Yes
Yes
Yes
No
Yes
Yes
Yes
Yes
No
Yes
Yes
No
Yes
Yes
No
No
Yes
No
No
No
Yes
No
Yes
Yes
No
Yes
No
No
No
No
Yes
Yes
No
Yes
No
No
No
Yes
No
No
Yes
No
Yes
Yes
No
No
Yes
No
Yes
Yes
Yes
Yes
No
No
No
No
Yes
No
Yes
Yes...

result:

ok 6000 token(s): yes count is 3000, no count is 3000

Test #138:

score: 0
Accepted
time: 12ms
memory: 4436kb

input:

7 30000 4285
6 7 1
3 4 5
2 1 7
7 6 5
6 5 4
3 2 1
2 3 4
13 14 9
8 11 12
13 10 8
14 13 10
10 8 11
9 12 11
14 9 12
19 16 20
17 19 16
18 15 21
18 17 19
21 20 16
15 18 17
20 21 15
23 25 27
27 24 28
28 26 22
22 23 25
25 27 24
24 28 26
23 22 26
32 29 33
30 34 31
29 32 35
29 33 30
35 31 34
33 30 34
31 35 32...

output:

Yes
Yes
Yes
No
Yes
Yes
No
Yes
No
Yes
Yes
Yes
Yes
Yes
No
Yes
No
No
No
Yes
Yes
No
Yes
No
No
No
No
Yes
No
Yes
Yes
No
No
No
No
Yes
Yes
No
No
Yes
No
No
Yes
Yes
No
No
No
No
Yes
Yes
No
Yes
No
Yes
No
No
Yes
Yes
No
Yes
Yes
Yes
No
Yes
No
No
Yes
Yes
Yes
No
Yes
Yes
No
No
No
No
Yes
No
Yes
Yes
No
Yes
No
Yes
No
Ye...

result:

ok 4285 token(s): yes count is 2142, no count is 2143

Test #139:

score: 0
Accepted
time: 20ms
memory: 4276kb

input:

960 30000 253
639 159 640
804 323 803
617 137 618
533 53 534
263 742 262
387 867 388
943 462 942
505 25 506
533 52 532
871 390 870
153 632 152
264 743 263
546 66 547
375 854 374
516 35 515
551 70 550
686 206 687
275 754 274
677 197 678
903 423 904
285 764 284
146 625 145
502 21 501
56 535 55
168 648...

output:

No
Yes
Yes
No
No
Yes
Yes
No
No
Yes
No
Yes
Yes
Yes
No
No
No
No
Yes
No
No
No
No
Yes
Yes
No
No
Yes
No
Yes
No
No
Yes
Yes
Yes
No
Yes
Yes
No
Yes
No
No
No
No
No
No
Yes
Yes
Yes
Yes
No
Yes
No
No
Yes
No
Yes
Yes
Yes
No
No
Yes
Yes
No
No
Yes
Yes
No
Yes
No
No
No
No
Yes
Yes
No
No
No
No
No
Yes
No
No
Yes
Yes
Yes
No
...

result:

ok 253 token(s): yes count is 127, no count is 126

Test #140:

score: 0
Accepted
time: 21ms
memory: 4272kb

input:

960 30000 258
77 797 557
902 182 422
128 368 608
274 34 754
960 240 480
162 402 642
689 929 209
521 761 41
622 382 142
814 574 334
532 772 52
919 679 439
340 100 820
516 276 36
398 638 878
89 329 569
300 540 780
78 318 558
636 876 156
727 7 247
745 505 265
464 704 944
328 568 808
700 940 220
257 497...

output:

No
Yes
No
No
Yes
Yes
Yes
No
No
Yes
No
No
No
No
Yes
Yes
No
No
Yes
Yes
Yes
Yes
No
Yes
No
Yes
No
Yes
Yes
No
No
No
No
Yes
Yes
No
Yes
Yes
No
No
Yes
No
Yes
No
Yes
No
No
No
No
Yes
Yes
Yes
Yes
No
No
No
Yes
Yes
No
No
No
Yes
No
Yes
Yes
Yes
No
No
Yes
Yes
No
No
Yes
No
Yes
No
Yes
Yes
No
Yes
Yes
No
No
No
No
Yes
N...

result:

ok 258 token(s): yes count is 129, no count is 129

Test #141:

score: 0
Accepted
time: 15ms
memory: 4484kb

input:

480 30000 449
297 57 298
150 389 149
109 348 108
451 211 452
86 325 85
115 354 114
324 84 325
255 15 256
469 228 468
285 44 284
469 229 470
267 27 268
155 394 154
229 468 228
63 302 62
17 257 18
145 385 146
294 54 295
240 479 239
476 235 475
180 419 179
458 218 459
295 55 296
464 223 463
428 187 427...

output:

No
Yes
No
No
No
No
No
No
Yes
No
Yes
No
No
No
Yes
No
Yes
Yes
No
Yes
Yes
No
No
No
Yes
Yes
Yes
Yes
No
Yes
No
No
No
No
No
Yes
Yes
Yes
No
No
Yes
No
No
No
Yes
Yes
Yes
Yes
No
Yes
No
No
No
Yes
Yes
No
Yes
Yes
No
No
No
No
No
No
No
Yes
Yes
No
Yes
Yes
No
Yes
No
Yes
No
Yes
No
No
Yes
No
Yes
Yes
Yes
No
Yes
Yes
No
...

result:

ok 449 token(s): yes count is 225, no count is 224

Test #142:

score: 0
Accepted
time: 9ms
memory: 4668kb

input:

480 30000 10000
65 305 66
242 2 243
134 373 133
11 250 10
261 20 260
230 470 231
434 194 435
181 421 182
281 41 282
3 242 2
197 437 198
133 372 132
445 204 444
191 430 190
44 284 45
4 243 3
15 254 14
189 429 190
193 432 192
260 19 259
98 337 97
310 69 309
183 422 182
370 130 371
48 287 47
455 214 45...

output:

Yes
No
Yes
Yes
No
No
Yes
Yes
No
Yes
No
Yes
No
Yes
Yes
No
No
Yes
Yes
No
Yes
Yes
No
No
No
Yes
Yes
No
No
Yes
Yes
No
Yes
Yes
Yes
No
No
No
No
No
Yes
No
No
Yes
No
No
Yes
Yes
No
Yes
Yes
Yes
No
No
No
No
Yes
Yes
No
Yes
Yes
Yes
Yes
No
Yes
No
Yes
No
Yes
No
No
Yes
No
Yes
Yes
No
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
Ye...

result:

ok 10000 token(s): yes count is 5000, no count is 5000

Test #143:

score: 0
Accepted
time: 22ms
memory: 4460kb

input:

480 30000 446
402 42 162
151 271 391
384 24 144
194 314 434
425 65 185
36 156 276
471 111 231
255 375 15
406 286 166
155 275 395
233 113 473
287 407 47
266 386 26
283 163 43
65 185 305
350 470 110
167 287 407
295 175 55
337 217 97
295 415 55
1 361 241
97 457 337
326 446 86
26 146 266
382 262 142
366...

output:

No
No
Yes
Yes
No
Yes
No
Yes
No
Yes
No
Yes
Yes
Yes
Yes
No
No
No
Yes
Yes
Yes
Yes
Yes
No
Yes
Yes
No
No
No
Yes
Yes
No
Yes
No
No
Yes
No
No
Yes
Yes
No
Yes
Yes
Yes
Yes
Yes
No
Yes
Yes
No
No
Yes
Yes
Yes
No
Yes
Yes
No
No
Yes
Yes
No
No
No
No
No
Yes
Yes
No
No
No
Yes
No
Yes
No
No
No
Yes
Yes
Yes
Yes
No
Yes
No
Yes...

result:

ok 446 token(s): yes count is 223, no count is 223

Test #144:

score: 0
Accepted
time: 13ms
memory: 4644kb

input:

480 30000 10000
113 473 353
122 242 362
441 321 201
324 444 84
112 472 352
454 334 214
138 258 378
448 328 208
478 358 238
60 180 300
139 19 379
471 351 231
288 168 48
466 346 226
311 191 71
476 356 236
156 36 396
467 107 227
264 144 24
312 432 72
228 108 468
51 171 291
299 419 59
33 153 273
400 280...

output:

Yes
Yes
Yes
Yes
No
Yes
Yes
Yes
Yes
Yes
No
Yes
Yes
No
Yes
No
Yes
Yes
No
No
No
No
No
No
Yes
Yes
No
Yes
No
No
Yes
Yes
Yes
Yes
Yes
No
Yes
Yes
No
Yes
No
No
Yes
Yes
Yes
No
Yes
Yes
Yes
No
Yes
No
Yes
Yes
Yes
No
No
No
No
No
Yes
Yes
No
Yes
No
Yes
Yes
Yes
No
No
Yes
No
No
No
Yes
Yes
No
Yes
Yes
No
Yes
No
No
Yes
...

result:

ok 10000 token(s): yes count is 5000, no count is 5000

Test #145:

score: 0
Accepted
time: 7ms
memory: 4460kb

input:

10000 30000 4438
7975 2243 7975
10001 2243 10001
10002 2243 10002
10003 2243 10003
10004 2243 10004
10005 2243 10005
10006 2243 10006
10007 2243 10007
10008 2243 10008
10009 2243 10009
10010 2243 10010
10011 2243 10011
10012 2243 10012
10013 2243 10013
10014 2243 10014
10015 2243 10015
10016 2243 10...

output:

No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
...

result:

ok 4438 token(s): yes count is 1, no count is 4437

Test #146:

score: 0
Accepted
time: 11ms
memory: 4424kb

input:

9999 30000 4461
9618 9479 9618
10000 9479 10000
10001 9479 10001
10002 9479 10002
10003 9479 10003
10004 9479 10004
10005 9479 10005
10006 9479 10006
10007 9479 10007
10008 9479 10008
10009 9479 10009
10010 9479 10010
10011 9479 10011
10012 9479 10012
10013 9479 10013
10014 9479 10014
10015 9479 100...

output:

No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
...

result:

ok 4461 token(s): yes count is 3, no count is 4458

Test #147:

score: 0
Accepted
time: 7ms
memory: 4372kb

input:

9973 30000 4439
2494 443 2494
9974 443 9974
9975 443 9975
9976 443 9976
9977 443 9977
9978 443 9978
9979 443 9979
9980 443 9980
9981 443 9981
9982 443 9982
9983 443 9983
9984 443 9984
9985 443 9985
9986 443 9986
9987 443 9987
9988 443 9988
9989 443 9988
9990 443 9987
9991 443 9985
9992 443 9982
9993...

output:

No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
...

result:

ok 4439 token(s): yes count is 0, no count is 4439

Test #148:

score: 0
Accepted
time: 7ms
memory: 4464kb

input:

9971 30000 4436
6274 3296 6274
9972 3296 9972
9973 3296 9973
9974 3296 9974
9975 3296 9975
9976 3296 9976
9977 3296 9977
9978 3296 9978
9979 3296 9979
9980 3296 9980
9981 3296 9981
9982 3296 9982
9983 3296 9983
9984 3296 9984
9985 3296 9985
9986 3296 9986
9987 3296 9984
9988 3296 9983
9989 3296 9981...

output:

No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
...

result:

ok 4436 token(s): yes count is 0, no count is 4436

Test #149:

score: 0
Accepted
time: 29ms
memory: 4344kb

input:

10000 30000 3
2635 9155 2635
10001 9155 10001
10002 9155 10002
10003 9155 10003
10004 9155 10004
10005 9155 10005
10006 9155 10006
10007 9155 10007
10008 9155 10008
10009 9155 10009
10010 9155 10010
10011 9155 10011
10012 9155 10012
10013 9155 10013
10014 9155 10014
10015 9155 10015
10016 9155 10016...

output:

No
Yes
No

result:

ok 3 token(s): yes count is 1, no count is 2

Test #150:

score: 0
Accepted
time: 29ms
memory: 4172kb

input:

9999 30000 3
5096 2426 5096
10000 2426 10000
10001 2426 10001
10002 2426 10002
10003 2426 10003
10004 2426 10004
10005 2426 10005
10006 2426 10006
10007 2426 10007
10008 2426 10008
10009 2426 10009
10010 2426 10010
10011 2426 10011
10012 2426 10012
10013 2426 10013
10014 2426 10014
10015 2426 10015
...

output:

Yes
No
No

result:

ok 3 token(s): yes count is 1, no count is 2

Test #151:

score: 0
Accepted
time: 29ms
memory: 4360kb

input:

9973 30000 3
2964 629 2964
9974 629 9974
9975 629 9975
9976 629 9976
9977 629 9977
9978 629 9978
9979 629 9979
9980 629 9980
9981 629 9981
9982 629 9982
9983 629 9983
9984 629 9984
9985 629 9985
9986 629 9986
9987 629 9987
9988 629 9988
9989 629 9989
9990 629 9990
9991 629 9991
9992 629 9992
9993 62...

output:

No
No
Yes

result:

ok 3 token(s): yes count is 1, no count is 2

Test #152:

score: 0
Accepted
time: 26ms
memory: 4168kb

input:

9971 30000 3
9436 1184 9436
9972 1184 9972
9973 1184 9973
9974 1184 9974
9975 1184 9975
9976 1184 9976
9977 1184 9977
9978 1184 9978
9979 1184 9979
9980 1184 9980
9981 1184 9981
9982 1184 9982
9983 1184 9983
9984 1184 9984
9985 1184 9985
9986 1184 9986
9987 1184 9987
9988 1184 9988
9989 1184 9989
99...

output:

No
No
Yes

result:

ok 3 token(s): yes count is 1, no count is 2

Test #153:

score: 0
Accepted
time: 11ms
memory: 4756kb

input:

3 30000 10000
2 1 2
4 1 4
5 1 5
6 1 6
7 1 7
8 1 8
9 1 9
10 1 10
11 1 11
12 1 12
13 1 13
14 1 14
15 1 15
16 1 16
17 1 17
18 1 18
19 1 19
20 1 20
21 1 21
22 1 22
23 1 23
24 1 24
25 1 25
26 1 26
27 1 27
28 1 28
29 1 29
30 1 30
31 1 31
32 1 32
33 1 33
34 1 34
35 1 35
36 1 36
37 1 37
38 1 38
39 1 39
40 1...

output:

No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
Yes
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
Yes
No
No
No
No
No
No
No
No
No
No
No
Yes
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
Yes
No
No
No
No
No
No
No...

result:

ok 10000 token(s): yes count is 517, no count is 9483

Test #154:

score: 0
Accepted
time: 10ms
memory: 4652kb

input:

4 30000 7500
4 1 4
5 1 5
6 1 6
7 1 7
8 1 8
9 1 9
10 1 10
11 1 11
12 1 12
13 1 13
14 1 14
15 1 15
16 1 16
17 1 17
18 1 18
19 1 19
20 1 20
21 1 21
22 1 22
23 1 23
24 1 24
25 1 25
26 1 26
27 1 27
28 1 28
29 1 29
30 1 30
31 1 31
32 1 32
33 1 33
34 1 34
35 1 35
36 1 36
37 1 37
38 1 38
39 1 39
40 1 40
41 ...

output:

No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
Yes
No
No
No
No
No
No
Yes
No
No
No
No
Yes
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
Yes
No
No
No
No
No
No
Yes
No
No
No
No
No
No
No
No
No
No
No
Yes
...

result:

ok 7500 token(s): yes count is 433, no count is 7067

Test #155:

score: 0
Accepted
time: 10ms
memory: 4544kb

input:

5 30000 6000
3 1 3
6 1 6
7 1 7
8 1 8
9 1 9
10 1 10
11 1 11
12 1 12
13 1 13
14 1 14
15 1 15
16 1 16
17 1 17
18 1 18
19 1 19
20 1 20
21 1 21
22 1 22
23 1 23
24 1 24
25 1 25
26 1 26
27 1 27
28 1 28
29 1 29
30 1 30
31 1 31
32 1 32
33 1 33
34 1 34
35 1 35
36 1 36
37 1 37
38 1 38
39 1 39
40 1 40
41 1 41
4...

output:

No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
Yes
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
Yes
No
No
No
No
No
No
No
No
No
N...

result:

ok 6000 token(s): yes count is 155, no count is 5845

Test #156:

score: 0
Accepted
time: 9ms
memory: 4636kb

input:

6 30000 5000
4 5 4
7 5 7
8 5 8
9 5 9
10 5 10
11 5 11
12 5 12
13 5 13
14 5 14
15 5 15
16 5 16
17 5 17
18 5 18
19 5 19
20 5 20
21 5 21
22 5 22
23 5 23
24 5 24
25 5 25
26 5 26
27 5 27
28 5 28
29 5 29
30 5 30
31 5 31
32 5 32
33 5 33
34 5 34
35 5 35
36 5 36
37 5 37
38 5 38
39 5 39
40 5 40
41 5 41
42 5 42...

output:

No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
...

result:

ok 5000 token(s): yes count is 8, no count is 4992

Test #157:

score: 0
Accepted
time: 6ms
memory: 4404kb

input:

7 30000 4285
7 3 7
8 3 8
9 3 9
10 3 10
11 3 11
12 3 12
13 3 13
14 3 14
15 3 15
16 3 16
17 3 17
18 3 18
19 3 19
20 3 20
21 3 21
22 3 22
23 3 23
24 3 24
25 3 25
26 3 26
27 3 27
28 3 28
29 3 29
30 3 30
31 3 31
32 3 32
33 3 33
34 3 34
35 3 35
36 3 36
37 3 37
38 3 38
39 3 39
40 3 40
41 3 41
42 3 42
43 3 ...

output:

No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
...

result:

ok 4285 token(s): yes count is 8, no count is 4277

Test #158:

score: 0
Accepted
time: 6ms
memory: 4444kb

input:

8 30000 3750
3 5 3
9 5 9
10 5 10
11 5 11
12 5 12
13 5 13
14 5 14
15 5 15
16 5 16
17 5 17
18 5 18
19 5 19
20 5 20
21 5 21
22 5 22
23 5 23
24 5 24
25 5 25
26 5 26
27 5 27
28 5 28
29 5 29
30 5 30
31 5 31
32 5 32
33 5 33
34 5 34
35 5 35
36 5 36
37 5 37
38 5 38
39 5 39
40 5 40
41 5 41
42 5 42
43 5 43
44 ...

output:

No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
...

result:

ok 3750 token(s): yes count is 3, no count is 3747

Test #159:

score: 0
Accepted
time: 10ms
memory: 4416kb

input:

9 30000 3333
4 2 4
10 2 10
11 2 11
12 2 12
13 2 13
14 2 14
15 2 15
16 2 16
17 2 17
18 2 18
19 2 19
20 2 20
21 2 21
22 2 22
23 2 23
24 2 24
25 2 25
26 2 26
27 2 27
28 2 28
29 2 29
30 2 30
31 2 31
32 2 32
33 2 33
34 2 34
35 2 35
36 2 36
37 2 37
38 2 38
39 2 39
40 2 40
41 2 41
42 2 42
43 2 43
44 2 44
4...

output:

No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
...

result:

ok 3333 token(s): yes count is 1, no count is 3332

Test #160:

score: 0
Accepted
time: 7ms
memory: 4396kb

input:

10 30000 3000
10 4 10
11 4 11
12 4 12
13 4 13
14 4 14
15 4 15
16 4 16
17 4 17
18 4 18
19 4 19
20 4 20
21 4 21
22 4 22
23 4 23
24 4 24
25 4 25
26 4 26
27 4 27
28 4 28
29 4 29
30 4 30
31 4 31
32 4 32
33 4 33
34 4 34
35 4 35
36 4 36
37 4 37
38 4 38
39 4 39
40 4 40
41 4 41
42 4 42
43 4 43
44 4 44
45 4 4...

output:

No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
...

result:

ok 3000 token(s): yes count is 1, no count is 2999

Test #161:

score: 0
Accepted
time: 2ms
memory: 3664kb

input:

1000 1998 1
2 502 501
1001 2 3
1002 503 502
1003 3 4
1004 504 503
1005 4 5
1006 505 504
1007 5 6
1008 506 505
1009 6 7
1010 507 506
1011 7 8
1012 508 507
1013 8 9
1014 509 508
1015 9 10
1016 510 509
1017 10 11
1018 511 510
1019 11 12
1020 512 511
1021 12 13
1022 513 512
1023 13 14
1024 514 513
1025 ...

output:

No

result:

ok NO

Test #162:

score: 0
Accepted
time: 3ms
memory: 3720kb

input:

1001 2000 1
2 503 502
1002 2 3
1003 504 503
1004 3 4
1005 505 504
1006 4 5
1007 506 505
1008 5 6
1009 507 506
1010 6 7
1011 508 507
1012 7 8
1013 509 508
1014 8 9
1015 510 509
1016 9 10
1017 511 510
1018 10 11
1019 512 511
1020 11 12
1021 513 512
1022 12 13
1023 514 513
1024 13 14
1025 515 514
1026 ...

output:

Yes

result:

ok YES

Test #163:

score: 0
Accepted
time: 2ms
memory: 3616kb

input:

1002 2002 1
2 503 502
1003 2 3
1004 504 503
1005 3 4
1006 505 504
1007 4 5
1008 506 505
1009 5 6
1010 507 506
1011 6 7
1012 508 507
1013 7 8
1014 509 508
1015 8 9
1016 510 509
1017 9 10
1018 511 510
1019 10 11
1020 512 511
1021 11 12
1022 513 512
1023 12 13
1024 514 513
1025 13 14
1026 515 514
1027 ...

output:

No

result:

ok NO

Test #164:

score: 0
Accepted
time: 3ms
memory: 3688kb

input:

1003 2004 1
2 504 503
1004 2 3
1005 505 504
1006 3 4
1007 506 505
1008 4 5
1009 507 506
1010 5 6
1011 508 507
1012 6 7
1013 509 508
1014 7 8
1015 510 509
1016 8 9
1017 511 510
1018 9 10
1019 512 511
1020 10 11
1021 513 512
1022 11 12
1023 514 513
1024 12 13
1025 515 514
1026 13 14
1027 516 515
1028 ...

output:

Yes

result:

ok YES

Test #165:

score: 0
Accepted
time: 2ms
memory: 3688kb

input:

1004 2006 1
2 504 503
1005 2 3
1006 505 504
1007 3 4
1008 506 505
1009 4 5
1010 507 506
1011 5 6
1012 508 507
1013 6 7
1014 509 508
1015 7 8
1016 510 509
1017 8 9
1018 511 510
1019 9 10
1020 512 511
1021 10 11
1022 513 512
1023 11 12
1024 514 513
1025 12 13
1026 515 514
1027 13 14
1028 516 515
1029 ...

output:

No

result:

ok NO

Test #166:

score: 0
Accepted
time: 0ms
memory: 3688kb

input:

1005 2008 1
2 505 504
1006 2 3
1007 506 505
1008 3 4
1009 507 506
1010 4 5
1011 508 507
1012 5 6
1013 509 508
1014 6 7
1015 510 509
1016 7 8
1017 511 510
1018 8 9
1019 512 511
1020 9 10
1021 513 512
1022 10 11
1023 514 513
1024 11 12
1025 515 514
1026 12 13
1027 516 515
1028 13 14
1029 517 516
1030 ...

output:

Yes

result:

ok YES

Test #167:

score: 0
Accepted
time: 2ms
memory: 3692kb

input:

1006 2010 1
2 505 504
1007 2 3
1008 506 505
1009 3 4
1010 507 506
1011 4 5
1012 508 507
1013 5 6
1014 509 508
1015 6 7
1016 510 509
1017 7 8
1018 511 510
1019 8 9
1020 512 511
1021 9 10
1022 513 512
1023 10 11
1024 514 513
1025 11 12
1026 515 514
1027 12 13
1028 516 515
1029 13 14
1030 517 516
1031 ...

output:

No

result:

ok NO

Test #168:

score: 0
Accepted
time: 3ms
memory: 3900kb

input:

1007 2012 1
2 506 505
1008 2 3
1009 507 506
1010 3 4
1011 508 507
1012 4 5
1013 509 508
1014 5 6
1015 510 509
1016 6 7
1017 511 510
1018 7 8
1019 512 511
1020 8 9
1021 513 512
1022 9 10
1023 514 513
1024 10 11
1025 515 514
1026 11 12
1027 516 515
1028 12 13
1029 517 516
1030 13 14
1031 518 517
1032 ...

output:

Yes

result:

ok YES

Test #169:

score: 0
Accepted
time: 2ms
memory: 3680kb

input:

1008 2014 1
2 506 505
1009 2 3
1010 507 506
1011 3 4
1012 508 507
1013 4 5
1014 509 508
1015 5 6
1016 510 509
1017 6 7
1018 511 510
1019 7 8
1020 512 511
1021 8 9
1022 513 512
1023 9 10
1024 514 513
1025 10 11
1026 515 514
1027 11 12
1028 516 515
1029 12 13
1030 517 516
1031 13 14
1032 518 517
1033 ...

output:

No

result:

ok NO

Test #170:

score: 0
Accepted
time: 0ms
memory: 3684kb

input:

1009 2016 1
2 507 506
1010 2 3
1011 508 507
1012 3 4
1013 509 508
1014 4 5
1015 510 509
1016 5 6
1017 511 510
1018 6 7
1019 512 511
1020 7 8
1021 513 512
1022 8 9
1023 514 513
1024 9 10
1025 515 514
1026 10 11
1027 516 515
1028 11 12
1029 517 516
1030 12 13
1031 518 517
1032 13 14
1033 519 518
1034 ...

output:

Yes

result:

ok YES

Test #171:

score: 0
Accepted
time: 2ms
memory: 3664kb

input:

1010 2018 1
2 507 506
1011 2 3
1012 508 507
1013 3 4
1014 509 508
1015 4 5
1016 510 509
1017 5 6
1018 511 510
1019 6 7
1020 512 511
1021 7 8
1022 513 512
1023 8 9
1024 514 513
1025 9 10
1026 515 514
1027 10 11
1028 516 515
1029 11 12
1030 517 516
1031 12 13
1032 518 517
1033 13 14
1034 519 518
1035 ...

output:

No

result:

ok NO

Test #172:

score: 0
Accepted
time: 17ms
memory: 4040kb

input:

9990 19978 1
2 4997 4996
9991 2 3
9992 4998 4997
9993 3 4
9994 4999 4998
9995 4 5
9996 5000 4999
9997 5 6
9998 5001 5000
9999 6 7
10000 5002 5001
10001 7 8
10002 5003 5002
10003 8 9
10004 5004 5003
10005 9 10
10006 5005 5004
10007 10 11
10008 5006 5005
10009 11 12
10010 5007 5006
10011 12 13
10012 5...

output:

No

result:

ok NO

Test #173:

score: 0
Accepted
time: 26ms
memory: 4084kb

input:

9991 19980 1
2 4998 4997
9992 2 3
9993 4999 4998
9994 3 4
9995 5000 4999
9996 4 5
9997 5001 5000
9998 5 6
9999 5002 5001
10000 6 7
10001 5003 5002
10002 7 8
10003 5004 5003
10004 8 9
10005 5005 5004
10006 9 10
10007 5006 5005
10008 10 11
10009 5007 5006
10010 11 12
10011 5008 5007
10012 12 13
10013 ...

output:

Yes

result:

ok YES

Test #174:

score: 0
Accepted
time: 17ms
memory: 4136kb

input:

9992 19982 1
2 4998 4997
9993 2 3
9994 4999 4998
9995 3 4
9996 5000 4999
9997 4 5
9998 5001 5000
9999 5 6
10000 5002 5001
10001 6 7
10002 5003 5002
10003 7 8
10004 5004 5003
10005 8 9
10006 5005 5004
10007 9 10
10008 5006 5005
10009 10 11
10010 5007 5006
10011 11 12
10012 5008 5007
10013 12 13
10014...

output:

No

result:

ok NO

Test #175:

score: 0
Accepted
time: 25ms
memory: 4048kb

input:

9993 19984 1
2 4999 4998
9994 2 3
9995 5000 4999
9996 3 4
9997 5001 5000
9998 4 5
9999 5002 5001
10000 5 6
10001 5003 5002
10002 6 7
10003 5004 5003
10004 7 8
10005 5005 5004
10006 8 9
10007 5006 5005
10008 9 10
10009 5007 5006
10010 10 11
10011 5008 5007
10012 11 12
10013 5009 5008
10014 12 13
1001...

output:

Yes

result:

ok YES

Test #176:

score: 0
Accepted
time: 17ms
memory: 4016kb

input:

9994 19986 1
2 4999 4998
9995 2 3
9996 5000 4999
9997 3 4
9998 5001 5000
9999 4 5
10000 5002 5001
10001 5 6
10002 5003 5002
10003 6 7
10004 5004 5003
10005 7 8
10006 5005 5004
10007 8 9
10008 5006 5005
10009 9 10
10010 5007 5006
10011 10 11
10012 5008 5007
10013 11 12
10014 5009 5008
10015 12 13
100...

output:

No

result:

ok NO

Test #177:

score: 0
Accepted
time: 26ms
memory: 4048kb

input:

9995 19988 1
2 5000 4999
9996 2 3
9997 5001 5000
9998 3 4
9999 5002 5001
10000 4 5
10001 5003 5002
10002 5 6
10003 5004 5003
10004 6 7
10005 5005 5004
10006 7 8
10007 5006 5005
10008 8 9
10009 5007 5006
10010 9 10
10011 5008 5007
10012 10 11
10013 5009 5008
10014 11 12
10015 5010 5009
10016 12 13
10...

output:

Yes

result:

ok YES

Test #178:

score: 0
Accepted
time: 18ms
memory: 4052kb

input:

9996 19990 1
2 5000 4999
9997 2 3
9998 5001 5000
9999 3 4
10000 5002 5001
10001 4 5
10002 5003 5002
10003 5 6
10004 5004 5003
10005 6 7
10006 5005 5004
10007 7 8
10008 5006 5005
10009 8 9
10010 5007 5006
10011 9 10
10012 5008 5007
10013 10 11
10014 5009 5008
10015 11 12
10016 5010 5009
10017 12 13
1...

output:

No

result:

ok NO

Test #179:

score: 0
Accepted
time: 29ms
memory: 4088kb

input:

9997 19992 1
2 5001 5000
9998 2 3
9999 5002 5001
10000 3 4
10001 5003 5002
10002 4 5
10003 5004 5003
10004 5 6
10005 5005 5004
10006 6 7
10007 5006 5005
10008 7 8
10009 5007 5006
10010 8 9
10011 5008 5007
10012 9 10
10013 5009 5008
10014 10 11
10015 5010 5009
10016 11 12
10017 5011 5010
10018 12 13
...

output:

Yes

result:

ok YES

Test #180:

score: 0
Accepted
time: 17ms
memory: 4132kb

input:

9998 19994 1
2 5001 5000
9999 2 3
10000 5002 5001
10001 3 4
10002 5003 5002
10003 4 5
10004 5004 5003
10005 5 6
10006 5005 5004
10007 6 7
10008 5006 5005
10009 7 8
10010 5007 5006
10011 8 9
10012 5008 5007
10013 9 10
10014 5009 5008
10015 10 11
10016 5010 5009
10017 11 12
10018 5011 5010
10019 12 13...

output:

No

result:

ok NO

Test #181:

score: 0
Accepted
time: 29ms
memory: 3992kb

input:

9999 19996 1
2 5002 5001
10000 2 3
10001 5003 5002
10002 3 4
10003 5004 5003
10004 4 5
10005 5005 5004
10006 5 6
10007 5006 5005
10008 6 7
10009 5007 5006
10010 7 8
10011 5008 5007
10012 8 9
10013 5009 5008
10014 9 10
10015 5010 5009
10016 10 11
10017 5011 5010
10018 11 12
10019 5012 5011
10020 12 1...

output:

Yes

result:

ok YES

Test #182:

score: 0
Accepted
time: 17ms
memory: 4080kb

input:

10000 19998 1
2 5002 5001
10001 2 3
10002 5003 5002
10003 3 4
10004 5004 5003
10005 4 5
10006 5005 5004
10007 5 6
10008 5006 5005
10009 6 7
10010 5007 5006
10011 7 8
10012 5008 5007
10013 8 9
10014 5009 5008
10015 9 10
10016 5010 5009
10017 10 11
10018 5011 5010
10019 11 12
10020 5012 5011
10021 12 ...

output:

No

result:

ok NO

Extra Test:

score: 0
Extra Test Passed