import java.io.*; import java.lang.Math; public class Main { static StreamTokenizer scanner; static int values = 2; static int n; static double[][] m; static double[][] matrix; protected static int readInt( ) throws IOException { scanner.nextToken( ); if ( scanner.ttype != StreamTokenizer.TT_NUMBER ) { System.err.println( scanner.lineno( ) + ": Int-Wert erwartet: " + scanner.toString() ); System.exit( 1 ); } return ( int )scanner.nval; } protected static double readDouble( ) throws IOException { scanner.nextToken( ); if ( scanner.ttype != StreamTokenizer.TT_NUMBER ) { System.err.println( scanner.lineno( ) + ": Double-Wert erwartet: " + scanner.toString() ); System.exit( 1 ); } return ( double )scanner.nval; } public static void main( String args[ ] ) { if ( args.length < 1 ) { System.out.println("Usage: java Matrix "); System.exit( 1 ); } String line; try { scanner = new StreamTokenizer( new BufferedReader( new FileReader( args[ 0 ] ) ) ); n = readInt( ); m = new double[ n+1 ][ values ]; for( int i = 0; i < n; i++ ) { for( int j = 0; j < values; j++) { m[ i ][ j ] = readDouble( ); } } for(int i=0; i