#K52972. Find the Chosen Chocolates

    ID: 29428 Type: Default 1000ms 256MiB

Find the Chosen Chocolates

Find the Chosen Chocolates

You are given m chocolates labeled from 1 to m and a number k representing the number of chocolates chosen by Nura. Hidden in the input is a special triple \( (a, b, c) \) (with \( a < b \) and \( c \neq a, b \)), for which a query function defined as:

[ \texttt{ask(i, j, t)} = \begin{cases} \texttt{YES} &\text{if } i=a,\ j=b,\ t=c, \ \texttt{NO} &\text{otherwise} \end{cases} ]

Your task is to simulate this query process by determining the two indices \( a \) and \( b \) from the provided triple. In other words, given the input values, output the pair \( (a, b) \).

Note: Although the original interactive version allows up to 60 queries, in this non-interactive version you are provided the necessary triple directly as input.

inputFormat

The input is given via standard input and consists of two lines:

  1. The first line contains two integers \( m \) and \( k \) where \( m \) denotes the total number of chocolates and \( k \) denotes the number of chocolates chosen by Nura.
  2. The second line contains three integers \( a\ b\ c \). It is guaranteed that \( 1 \le a < b \le m \) and \( c \) is an integer in the range \( [1, m] \) with \( c \neq a \) and \( c \neq b \).

outputFormat

Output the two integers \( a \) and \( b \) separated by a space via standard output.

## sample
4 2
2 3 4
2 3