#include <iostream>

using namespace std;

int main()
{
    long long a,b,c,d,e,x,y,z,q;
    cin>>a;
    cin>>b>>c;
    cin>>d>>e;
    cin>>x>>y;
    cin>>z>>q;
    cout<<3<<" "<<7<<endl;
    cout<<1679133257<<" "<<1664596343<<endl;
    cout<<3<<" "<<3<<endl;
    cout<<-1;
}