#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; int main() { long double a; cin >> a; if (a > 1) { cout << "B "; for (long double i = 1;; i++) { if (a * i == floor(a * i)) { cout << (a + 2) * i - 3 << endl; return 0; } } } else if (a < 1) { cout << "C "; for (long double i = 1;; i++) { if (a * i == floor(a * i)) { cout << (a + 2) * i - 3 << endl; return 0; } } } else { cout << "A 1" << endl; } }