Problem

Source: Lithuania NMO 2010

Tags: combinatorics, Chessboard



In an $m\times n$ rectangular chessboard,there is a stone in the lower leftmost square. Two persons A,B move the stone alternately. In each step one can move the stone upward or rightward any number of squares. The one who moves it into the upper rightmost square wins. Find all $(m,n)$ such that the first person has a winning strategy.