Grace has n numbers. They are a_{1}……a_{n }. Let M = sqrt(n), meaning the biggest integer which is less than or equal to the square root of n. And there are n queries. For each query, there are two integers x and y. You need to answer the M-th biggest number among a_{x}, a_{x+y}……(x + ky <= n) . If the number of the elements is less than M, please output -1.