#include <iostream> #include <stdio.h> #include <iostream> using namespace std; int main() { int a,b,c,d,x,y; while(cin>>x>>y&&(x||y)) { a=b=x; c=d=y; while(cin>>x>>y&&(x||y)) { if(a>x) a=x; if(b<x) b=x; if(c>y) c=y; if(d<y) d=y; } cout<<a<<" "<<c<<" "<<b<<" "<<d<<endl; } return 0; }