Problem

Source: Estonia IMO TST 2016 p9

Tags: combinatorics, inequalities, permutation



Let $n$ be a positive integer such that there exists a positive integer that is less than $\sqrt{n}$ and does not divide $n$. Let $(a_1, . . . , a_n)$ be an arbitrary permutation of $1, . . . , n$. Let $a_{i1} < . . . < a_{ik}$ be its maximal increasing subsequence and let $a_{j1} > . . . > a_{jl}$ be its maximal decreasing subsequence. Prove that tuples $(a_{i1}, . . . , a_{ik})$ and $(a_{j1}, . . . , a_{jl} )$ altogether contain at least one number that does not divide $n$.