#include #include #include #include #include #include #include #include #include #include using namespace std; class PowerOfThreeEasy { public: string ableToGet(int x, int y); }; string PowerOfThreeEasy::ableToGet(int x, int y) { while (x != 0 || y != 0) { if ((x % 3) + (y % 3) != 1) return "Impossible"; x /= 3; y /= 3; } return "Possible"; }