#P7859. Product(无SPJ)
Product(无SPJ)
Product
Problem Description
You are given a prime . For a number , you need to find positive integers such that , and . Output any valid solution.
Input
The first line contains a prime , is chosen uniformly and randomly from . The second line contains a integer . Each line of the following lines contains an integer , is chosen from uniformly and randomly.
Output
Output lines for each number. In each line, prine first, then .
Sample Input
178187
3
6
100
109065
Sample Output
2 2 3
1 100
2 1000 1000
Source
2020 Multi-University Training Contest 9