#P1587. 枚举元组

枚举元组

Description

Input Format

Output Format

2 3
1 1
1 2
1 3
2 1
2 2
2 3
3 1
3 2
3 3

Hint

Source

贪心