#include<stdio.h>#include<math.h>const double g=9.8;const double PI=acos(-1.0);struct Node{ double x,y;}node[210];int main(){ int n; int t; double w,hm; double a,b; while(scanf("%d",&n)!=EOF) { t=0; double h; double d; scanf("%lf%lf",&h,&d); w=d; for(int i=1;i<n-1;i++) { scanf("%lf%lf",&node[t].y,&d); node[t].x=w; t++; w+=d; node[t].y=node[t-1].y; node[t].x=w; t++; } scanf("%lf%lf",&h,&d); w+=d; double tmp; hm=0; for(int i=0;i<t;i++) { tmp=w*w*node[i].y/(-node[i].x*node[i].x+w*node[i].x)/4; if(tmp>hm)hm=tmp; } double res1=atan(4*hm/w)*180/PI; double res2=sqrt(g*w*w/(8*hm)+2*g*hm); printf("%.2lf %.2lfn",res1,res2); } return 0;}