1 #include<cstdio>
2 #include<iostream>
3 #include<algorithm>
4
5 using namespace std;
6
7 int a[100005];
8
9 inline int er_fen(int l, int r, int x){
10 while(l <= r){
11 int mid = (l + r) >> 1;
12 if(a[mid] == x) return 1;
13 else if(a[mid] > x) r = mid - 1;
14 else if(a[mid] < x) l = mid + 1;
15 }
16 return 0;
17 }
18
19 int main(){
20 int n, m;
21 scanf("%d", &n);
22 for(int i = 1; i <= n; i++){
23 scanf("%d", &a[i]);
24 }
25 sort(a + 1, a + n + 1);
26 scanf("%d", &m);
27 for(int i = 1; i <= n; i++){
28 int t = m - a[i];
29 if(er_fen(i + 1, n, t)) {printf("%d %d
", a[i], t); return 0;}
30 }
31 printf("No
");
32 return 0;
33 }