Two persons are playing the following game on a $n\times m$ table, with drawn lines:
Person $\#1$ starts the game. Each person in their move, folds the table on one of its lines. The one that could not fold the table on their turn loses the game.
Who has a winning strategy?
1. **Base Case:**
   - Consider the case when \( n = 1 \). 
   - If \( m = 1 \), the first player cannot make a move, so the first player loses. Thus, \( m = 1 \) is a losing position (denoted as \( L \)).
   - If \( m = 2 \), the first player can fold the table to \( 1 \times 1 \), which is a losing position for the second player. Thus, \( m = 2 \) is a winning position (denoted as \( W \)).
   - If \( m = 3 \), the first player can fold the table to \( 1 \times 1.5 \) (which rounds up to \( 1 \times 2 \)), a winning position for the second player. Thus, \( m = 3 \) is a losing position.

2. **Inductive Step:**
   - Assume that for \( n = 1 \), the positions \( m = 2^k - 1 \) are losing positions for all \( k \in \mathbb{N} \).
   - We need to show that for \( n = 1 \), if \( m = 2^{k+1} - 1 \), it is also a losing position.
   - If \( m = 2^{k+1} - 1 \), any fold by the first player will result in a table of size \( 1 \times j \) where \( j \geq \lceil \frac{2^{k+1} - 1}{2} \rceil = 2^k \). Since \( 2^k \leq j \leq 2^{k+1} - 2 \), by the induction hypothesis, \( j \) is a winning position for the second player. Thus, \( m = 2^{k+1} - 1 \) is a losing position for the first player.

3. **General Case:**
   - For \( n \times m \) where \( m \geq n \), we need to show that \( m \in (a_i)_{i \in \mathbb{Z}_{\geq 0}} \) where \( a_{i+1} = 2a_i + 1 \) and \( a_0 = n \) are losing positions.
   - **Claim 1:** \( [n \times n] \) is a losing position.
     - If the first player folds by columns, the resulting table is \( [j \times n] \) where \( n > j \geq \lceil \frac{n}{2} \rceil \).
     - By the induction hypothesis, \( n \in (a_i)_{i \in \mathbb{Z}_{\geq 0}} \) where \( a_{i+1} = 2a_i + 1 \) and \( a_0 = j \). Since \( 2j + 1 \geq 2 \lceil \frac{n}{2} \rceil + 1 > n \), this is a contradiction. Thus, \( [n \times n] \) is a losing position.
   - **Claim 2:** If \( [n \times i] \) is a losing position, then \( [n \times j] \) for all \( j \in \{i+1, \dots, 2i\} \) are winning positions.
     - The first player can fold to \( [n \times i] \), making the second player face a losing position.
   - **Main Claim:** \( [n \times m] \) is a losing position if and only if \( m \in (a_i)_{i \in \mathbb{Z}_{\geq 0}} \) where \( a_{i+1} = 2a_i + 1 \) and \( a_0 = n \).
     - Suppose \( m \in \{n, \dots, i\} \) and let \( a_r \) be the largest term of the sequence less than \( i \). If \( i < a_{r+1} = 2a_r + 1 \), then by Claim 2, it is a winning position.
     - If \( i = a_{r+1} = 2a_r + 1 \), any fold by the first player results in a table of size \( [n \times j] \) where \( 2a_r + 1 > j \geq \lceil \frac{2a_r + 1}{2} \rceil = a_r + 1 \). By Claim 2, this is a winning position for the second player, contradicting the assumption that it is a winning position for the first player.

Thus, the final answer is that the losing positions are given by \( (n+1)2^k - 1 \).

The final answer is \( \boxed{ (n+1)2^k - 1 } \)