atcoder#ABC195F. [ABC195F] Coprime Present
[ABC195F] Coprime Present
Score : points
Problem Statement
You have cards: for each integer from through , you have one card with that integer written on it. You will give some of them (possibly none) to your pet, Snuke.
Snuke will be happy if, for every pair of different cards, the numbers written on them are pairwise coprime; otherwise, he will be sad.
How many sets of cards will make Snuke happy?
Constraints
- All values in input are integers.
Input
Input is given from Standard Input in the following format:
Output
Print the number of sets of cards that will make Snuke happy. The constraints guarantee that the answer is less than 2^{63}.
2 4
6
You have three cards with , , and written on them. The following six sets of cards will make Snuke happy:
1 1
2
The following two sets of cards will make Snuke happy:
123456789000 123456789050
2125824