~/algor $ cat problems/minmax-14-b-dan-katta-eng-kichik-son
Smallest number greater than B
Easy
1000 ms
256 MB
30%
A positive integer $N$, an integer $B$ and $N$ integers are given. Among the numbers greater than $B$, find the smallest one and the position of its first occurrence (if there is no such number, print 0 0).
Input
The first line contains two integers: $N$ and $B$. The next line contains $N$ integers $A_{i}$.
Output
One line with two integers separated by a space: the smallest number greater than $B$ and its position (if there is none — 0 0).
Note
$1 \le N \le 1000$
$-10^{9} \le B \le 10^{9}$
$-10^{9} \le A_{i} \le 10^{9}$
Examples
Input #1
5 4 2 7 5 9 1
Output #1
5 3
Input #2
4 10 3 8 2 5
Output #2
0 0