Problem F
Stigavörður
Languages
en
is

You really like playing games with your friend. This time,
however, you are stuck being the score keeper for two of your
friends. They are playing a game where
-
Select a single tile and change the number on a that tile.
-
Select some two numbers
and , such that and scorepoints, where
is the number on the -th tile and represents the greatest common divisor of and , that is, the largest integer such that both and have no remainder.
You are not quite sure what the goal of the game is, but that does not matter. All you need to do is keep track of the scores.
Input
The first line of the input contains two integers
Output
For each turn in the game, in order, where a player scores, the output should contain a line with the score achieved that turn.
Scoring
Group |
Points |
Scoring |
1 |
50 |
|
2 |
50 |
No further constraints |
Sample Input 1 | Sample Output 1 |
---|---|
4 7 1000000000 7 4 100 2 1 1 2 2 2 2 3 3 2 4 4 2 1 4 1 2 6 2 1 4 |
1000000000 7 4 100 1 2 |