fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int A;
  6. int B;
  7. int C;
  8. cin >> A >> B >> C;
  9.  
  10. if ((A + B) % 2 == 0) {
  11. cout << "TAK" << "\n";
  12. cout << A << " " << B;
  13. } else if ((C + B) % 2 == 0) {
  14. cout << "TAK" << "\n";
  15. cout << C << " " << B;
  16. } else if ((C + A) % 2 == 0) {
  17. cout << "TAK" << "\n";
  18. cout << C << " " << A;
  19. } else {
  20. cout << "NIE";
  21. }
  22.  
  23. return 0;
  24. }
  25.  
Success #stdin #stdout 0.01s 5292KB
stdin
7 8 9
stdout
TAK
9 7