//Bismillahir Rahmanir Rahim
/******Harun Or Rashid******/
/***********Template Starts Here***********/
#include<iostream>
#include<cstdio>
#include<cstring>
#include<cmath>
#include<cctype>
#include<cstdlib>
#include<cassert>
#include<string>
#include<vector>
#include<set>
#include<stack>
#include<queue>
#include<map>
#include<algorithm>
using namespace std;
#define MEM(a,b) memset(a,b,sizeof(a))
#define CLR(a) memset(a,0,sizeof(a))
#define MAX(a,b) ((a)>(b)?(a):(b))
#define MIN(a,b) ((a)>(b)?(b):(a))
#define ABS(a) ((a)>0? (a):(-(a)))
#define SQ(a) ((a)*(a))
#define SZ(a) (int)a.size()
#define FORN(i,n) for(i=1;i<=n;i++)
#define FORAB(i,a,b) for(i=a;i<=b;i++)
#define ALL(V) V.begin(),V.end()
#define pb(a) push_back(a)
#define pr(a) cout<<a<<endl
#define SQR(a) ((a)*(a))
#define pf printf
#define sf scanf
#define swap(a,b) (a ^= b, b ^= a, a ^= b)
#define PI acos(-1)
#define x first
#define y second
#define eps 1e-7
typedef int D;
typedef long long int LLD;
typedef unsigned long long int LLU;
typedef vector<D> VI;
typedef set<D> SI;
typedef vector<D>::iterator Viti;
/***********Template Ends Here***********/
int main()
{
int T,i;
double m,a,b,c,d,S,TA,h,A,x,y,z,n,l,r;
cin>>T;
for(i=1; i<=T; i++)
{
cin>>a>>b>>c>>d;
m=a-b;
S=(m+c+d)/2.;
TA=sqrt(S*(S-m)*(S-c)*(S-d));
h=(TA/m)*2;
A=((a+b)/2/2)*h;
x=m;
y=2*b*h;
z=-(2*A*h);
n=(-y+sqrt(y*y-4*x*z))/(2*x);
l=c*n/h;
r=d*n/h;
l=c-l;
r=d-r;
printf("Land #%d: %lf %lf\n",i,l,r);
}
return 0;
}
Ly9CaXNtaWxsYWhpciBSYWhtYW5pciBSYWhpbQovKioqKioqSGFydW4gT3IgUmFzaGlkKioqKioqLwovKioqKioqKioqKipUZW1wbGF0ZSBTdGFydHMgSGVyZSoqKioqKioqKioqLwojaW5jbHVkZTxpb3N0cmV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