水题,题中恰好提示了8*3的情况,剩下情况直接对8取余,若能整除,则化为4*2或8*2或8*3
// Problem#: 1692
// Submission#: 3251647
// The source code is licensed under Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License
// URI: http://creativecommons.org/licenses/by-nc-sa/3.0/
// All Copyright reserved by Informatic Lab of Sun Yat-sen University
#include<iostream>
using namespace std;
int main() {
int a, b;
while (cin >> a >> b) {
if (a == 0 && b == 0)
break;
if (a * b % 8 == 0&& a != 1 && b != 1)
cout << "YES\n";
else
cout << "NO\n";
}
}