#include <iostream>

using namespace std;

int main()
{
    long long int n;
    cin >> n;
    int a[n];
    for(long long int i=0;i<n;++i)
    {
        cin >> a[i];
    }

    cout << a[1] << " " << a[0];

    return 0;
}