#include <iostream> using namespace std; int main() { int a; while (cin >> a) { if (a & 1) { cout << "0 0" << endl; } else { cout << (a + 2) / 4 << " " << a / 2 << endl; } } return 0; }
对于奇数条腿,已经没有人类了;
对于偶数条腿,如果全为兔子,则数量最少,所以除4,但考虑到多出一只鸡的特殊情况,所以是 (a + 2)/4