
import java.util.Scanner;

class Ex8_3 {

	public static void main( String args[] )
	{
		Scanner scanner = new Scanner(System.in);

		System.out.print("\nPlease input row: ");
		int row = scanner.nextInt();
		System.out.print("Please input column: ");
		int col = scanner.nextInt();

		for( int i = 0; i < row; i++ )
		{
			// inner loop
			for( int j = 0; j < col; j++ )
				System.out.print( i+","+j+"\t" );

			System.out.println();		// print new line
		}
	}
}

