q="$System.in".split()*.toLong() 11.times{t->P={o->u=10-t;t*(3*u*(u*q[o]+t*q[o+2])+t*t*q[o+4])/1000};println P(2)+' '+P(3)}