This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using i64 = long long;
struct Point {
i64 x;
i64 y;
};
int main() {
i64 W, H;
int K;
std::cin >> W >> H >> K;
std::vector<Point> points(K);
for (auto &[x, y] : points) {
std::cin >> x >> y;
}
if (K == 0) {
bool ok = false;
if ((H % 2 == 0 and W % 3 == 0) or (H % 3 == 0 and W % 2 == 0)) {
ok = true;
}
std::cout << (ok ? "YES" : "NO") << std::endl;
}
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |