#CCBCHBA0000102. Bảng nhân đầy đủ (Complete Multiplication Table)

Bảng nhân đầy đủ (Complete Multiplication Table)

Complete Multiplication Table

Source: Phước Hưng OJ

Version: Phuoc Hung OJ Extended

Problem Statement

Given nn, print an nn-by-nn multiplication table. Cell (i,j)(i,j), with indices starting at 1, contains i×ji\times j. Separate consecutive numbers in each row by exactly one space and never print a trailing space.

Input

One line contains the integer nn.

Output

Print nn lines of nn integers each.

Subtasks

  • Subtask 1 (20%): 1≤n≤31\le n\le 3.

  • Subtask 2 (30%): 1≤n≤71\le n\le 7.

  • Subtask 3 (50%): 1≤n≤121\le n\le 12.

Examples

Example 1

Input:

1

Output:

1

Explanation:

The 1×1 table contains the product of row and column indices in every cell.

Example 2

Input:

3

Output:

1 2 3
2 4 6
3 6 9

Explanation:

The 3×3 table contains the product of row and column indices in every cell.