#include <iostream>
#include <cmath>
using namespace std;
int main()
{
double max = 0;
int K=2,L,x=0,y=1;
cin >> L;
int D[K][L];
for (int i = 0; i < K; i++)
{
for (int j = 0; j < L; j++)
{
cin>>D[i][j];
}
}
for (int i = 0; i < L-1; i++)
{
for (int j = 0; j < L; j++)
{
double q=sqrt((D[x][i]-D[x][j])*(D[x][i]-D[x][j])+(D[y][i]-D[y][j])*(D[y][i]-D[y][j]));
if(q>max)
{
max=q;
}
}
}
for (int i = 0; i < K; i++)
{
for (int j = 0; j < L; j++)
{
cout<<D[i][j]<<" ";
}
cout<<"\n";
}
cout<<max;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8Y21hdGg+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7CmludCBtYWluKCkgCnsKCWRvdWJsZSBtYXggPSAwOwoJaW50IEs9MixMLHg9MCx5PTE7CgljaW4gPj4gTDsKCWludCBEW0tdW0xdOwoJZm9yIChpbnQgaSA9IDA7IGkgPCBLOyBpKyspCgl7CgkJZm9yIChpbnQgaiA9IDA7IGogPCBMOyBqKyspCgkJewoJCQljaW4+PkRbaV1bal07CgkJfQoJfQoJZm9yIChpbnQgaSA9IDA7IGkgPCBMLTE7IGkrKykKCXsKCQlmb3IgKGludCBqID0gMDsgaiA8IEw7IGorKykKCQl7CgkJCWRvdWJsZSBxPXNxcnQoKERbeF1baV0tRFt4XVtqXSkqKERbeF1baV0tRFt4XVtqXSkrKERbeV1baV0tRFt5XVtqXSkqKERbeV1baV0tRFt5XVtqXSkpOwoJCQlpZihxPm1heCkKCQkJewoJCQkJbWF4PXE7CgkJCX0KCQl9Cgl9Cglmb3IgKGludCBpID0gMDsgaSA8IEs7IGkrKykKCXsKCQlmb3IgKGludCBqID0gMDsgaiA8IEw7IGorKykKCQl7CgkJCWNvdXQ8PERbaV1bal08PCIgIjsKCQl9CgkJY291dDw8IlxuIjsKCX0KCWNvdXQ8PG1heDsKCXJldHVybiAwOwp9