// https://www.geeksforgeeks.org/check-exist-two-elements-array-whose-sum-equal-sum-rest-array/
#include <iostream>
#include <set>
using namespace std;
void func(int a[],int n){
int sum=0;
for (int i=0;i<n;i++)
sum+=a[i];
if (sum%2==1){
cout<< "No such pair exists!";
exit(0);
}
sum/=2;
set <int> s;
for(int i=0;i<n;i++) {
int v=sum-a[i];
if (s.find(v) != s.end()){
cout<< "Elements are: " << a[i] << " and " << v ;
exit(0);
}
s.insert(a[i]);
}
cout<< "No such pair exists!";
}
int main() {
int n;
cin>>n;
int a[n];
for (int i=0;i<n;i++)
cin>>a[i];
func(a,n);
}