1697: 和为给定数

Memory Limit:128 MB Time Limit:1.000 S
Judge Style:Text Compare Creator:
Submit:5 Solved:3

Description

给出若干个整数,询问其中是否有一对数的和等于给定的数。

Input

Output

若存在和为m的数对,输出两个整数,小的在前,大的在后,中间用单个空格隔开。若有多个数对满足条件,选择数对中较小的数更小的。若找不到符合要求的数对,输出一行No

Sample Input Copy

4
2 5 1 4
6

Sample Output Copy

1 5

Source/Category