#include<bits/stdc++.h>
using namespace std;
const int N = 1e2+10;
int t,n,m,k,l,r,op,x,y;
int f[N];
unordered_set<int>st;
void solve(){
cin>>n;
for(int i = 1;i<=n;i++){
cin>>f[i];
}
sort(f+1,f+1+n);
for(int i = 1;i<=n;i++){
for(int j = 1;j<=n;j++){
if(i==j||st.find(f[i]*N+f[j])!=st.end())continue;
st.insert(f[i]*N+f[j]);
cout<<"("<<f[i]<<","<<f[j]<<")"<<"\n";
}
}
}
int main(){
ios::sync_with_stdio(false);
cin.tie(nullptr);
cout.tie(nullptr);
solve();
return 0;
}