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 namespace std;
using ll = long long;
const long long N = 3e5 + 5;
signed main() {
int w, h, k; cin >> w >> h >> k;
if (w % 2 == 0 && h % 3 == 0) {
cout << "YES\n";
return 0;
}
if (w % 3 == 0 && h % 2 == 0) {
cout << "YES\n";
return 0;
} if (w % 3 == 2 && h % 2 ==0 && h % 3 == 0) {
cout << "YES\n";
return 0;
} if (h % 3 == 2 && w % 2 ==0 && w % 3 == 0) {
cout << "YES\n";
return 0;
}
cout << "NO\n";
return 0;
}
# | 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... |