#include #include #include const double THIRD = 1/3; using namespace std; int main() { int n; while ( cin >> n ) { vector > points; double Max = 0; double lineA, lineB, lineC; for ( int i = 0 ; i < n ; i ++ ) { double a, b; points . push_back ( pair(a, b)); cin >> a >> b; double x = cbrt((double)(a * b * b)); double y = ( a * b ) / x; double val = sqrt ( ( a + x ) * ( a + x ) + ( b + y ) * ( b + y ) ); if ( val > Max ) { lineA = b+y; lineB = a+x; lineC = ( b * x + y * x); Max = val; } } bool fail = false; for ( unsigned int i = 0 ; i < points . size () ; i ++ ) { if ( lineA * points [ i ] . first + lineB * points [ i ] . second + lineC <= 10e-4 ) { fail = true; break; } } if ( fail ) { for ( unsigned int i = 0 ; i < points . size () ; i ++ ) { lineA = points [ i ]. second; lineB = points [ i ]. first; lineC = - 2 * ( points [ i ] . first * points [ i ] . second ); for ( unsigned int j = 0 ; j < points . size () ; j ++ ) { if ( lineA * points [ i ] . first + lineB * points [ i ] . second + lineC <= 10e-4 ) { continue; } Max = sqrt ( points [ i ] . first * points [ i ] . first + points [ i ] . second * points [ i ] . second ); break; } } } cout << Max << endl; } }