#include <stdio.h>

#define EPSILON .0000001
#define PI 3.14159254

double arctan(double x);
double angulo(double x, double y);

int main()
{
  int i, n;
  double x, y, x0 = 0, y0 = 1, a_min = 90;

  scanf("%d", &n);

  for (i = 0; i < n; i++) {
    scanf("%lf %lf", &x, &y);
    /*
       Suporemos que nunca temos x = 0 e y = 0.
     */
    printf("Angulo: %g\n", angulo(x,y));
    if (angulo(x, y) < a_min) {
      a_min = angulo(x, y);
      x0 = x; y0 = y;
    }
  }

  printf("Ponto de menor angulo: (%g,%g) [angulo = %g]\n",
         x0, y0, angulo(x0, y0));

  return 0;
}

double arctan(double x)
{
  int k = 0, f = 1;
  double t, p, s;

  p = t = x;
  s = t;

  while (t >= EPSILON || t <= -EPSILON)
    { p *= x*x; f = -f; k++; t = f*p/(2*k+1); s += t; }

  return s;
  
}

double angulo(double x, double y)
{
  double r;

  if (y < x)
    r = arctan(y/x);
  else
    r = PI/2 - arctan(x/y);

  return 180*r/PI;

}
