#include <bits/stdc++.h>
using namespace std;
#define ll long long
const int N = 510;
int n,ans;
int a[N][N];
int main(){
freopen("sanguo.in","r",stdin);
freopen("sanguo.out","w",stdout);
scanf("%d",&n);
for(int i = 1;i <= n;i++){
for(int j = i+1;j <= n;j++)scanf("%d",&a[i][j]),a[j][i] = a[i][j];
}
for(int i = 1;i <= n;i++){
sort(a[i]+1,a[i]+1+n);
ans = max(a[i][n-1],ans);
}
printf("1\n%d\n",ans);
return 0;
}