#include<bits/stdc++.h>
using namespace std;
const int N=1005;
#define int long long
#define db long double
int n;
db x[N],y[N],w[N],ansx,ansy,res,df,nowans=INT_MAX,ans=INT_MAX;
int calc(int a,int b){
db ret=0;
for(int i=1;i<=n;i++){
ret+=sqrt((a-x[i])*(a-x[i])+(b-y[i])*(b-y[i]))*w[i];
}
return ret;
}
void SA(){
for(db temp=200;temp>(1e-15);temp*=0.998){
db nowx=ansx+(rand()*2-RAND_MAX)*temp,nowy=ansy+(rand()*2-RAND_MAX)*temp;
res=calc(nowx,nowy);df=res-nowans;
if(df<0){
nowans=res;
if(ans>nowans) ans=nowans,ansx=nowx,ansy=nowy;
}else if((db)(exp((-df*1.0)/temp))*RAND_MAX>rand()){
nowans=res;
}
}
}
signed main(){
ios::sync_with_stdio(0),cin.tie(0),cout.tie(0);
cin>>n;
for(int i=1;i<=n;i++) cin>>x[i]>>y[i]>>w[i];
nowans=calc(0,0);
SA();
while(clock()*1.0/CLOCKS_PER_SEC<0.9) SA();
printf("%.3lf %.3lf",ansx,ansy);
return 0;
}