Company: SIXT
Difficulty: medium
Game on Tokens Problem Description Alice and Bob play a game on n independent tokens. Token i is placed at coordinates (x_i, y_i) on the integer lattice (both coordinates are non-negative integers). Alice moves first and the players alternate moves. A single move consists of: choosing any one token, and decreasing either its x coordinate or its y coordinate by a prime number p such that p ≤ that coordinate (the result must remain non-negative). A token with (0,0) has no moves. A player who cannot make a move on their turn loses. Given the starting coordinates of all tokens, determine which player has a winning strategy when both play optimally. Output A if Alice (first player) wins, or B if Bob (second player) wins. Note: Coordinates are small ( ≤ 200 ). Subtractions are restricted to prime numbers (2, 3, 5, ...). 1 is not a prime. Input Input: First line: integer n — number of tokens. Next n lines: two integers x_i and y_i (space separated) — coordinates of token i . Output Outp