fork(1) download
  1. #include <iostream>
  2. using namespace std;
  3. int main() {
  4. int n, m, k;
  5. cin >> n >> m >> k;
  6. if ((k < m * n) && ((k % m == 0) || (k % n == 0))) {
  7. cout << "YES";
  8. } else {
  9. cout << "NO";
  10. }
  11. return 0;
  12. }
Success #stdin #stdout 0s 3464KB
stdin
5 5 3
stdout
NO