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;
 
typedef long long ll;
 
#define pb     push_back
#define fi     first
#define se     second
#define all(x) x.begin(), x.end()
 
const int maxn5 = 4e5 + 10;
 
int cnt[maxn5];
vector <int> av, tmp[2];
 
int main(){
    ios_base::sync_with_stdio(false); cin.tie(0);
 
    ll h, w, k; cin >> h >> w >> k;
    if(h % 3 == 0 && w % 2 == 0)
        cout << "YES\n";
    else if(h % 2 == 0 && w % 3 == 0)
        cout << "YES\n";
    else if(h % 6 == 0 || w % 6 == 0)
        cout << "YES\n";
    else
        cout << "NO\n";
 
}
| # | 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... |