#include<iostream>
#include <stdio.h>
#include<cmath>
using namespace std;

#define d(J) n*2 * sin( (a[i]-a[J]) * M_PI )

int s, n, q, i, j;
double p, m, a[10000];

int main () {
  cin >> n;
  while( cin >> n ){
    for( m=i=j=0; i<n; i++ ){
      cin >> p >> q;
      a[i] = p/q;
      while( i && d(j+1)>d(j) )
	j++;
      m = max(d(j), m);
    }
    printf( "Scenario #%d:\n%.2f\n\n", ++s, m );
  }
}
