eolymp
bolt
Попробуйте наш новый интерфейс для отправки задач
Задачи

An Idea of Mr. A

An Idea of Mr. A

Лимит времени 0.5 секунд
Лимит использования памяти 256 MiB

Mr. A proposes to his son the following problem:

"Consider two integers n_1 and n_2 such that 1n_1 < n_210^4.

Using the function p:N^{*}→N^{*}, p(n)=2^n, n N^{*} (where N^{*} is the set of positive integers) we define the set

We also define a set of pairs as follows:

Consider the formula:

where gcd(m_1,m_2) is the greatest common divisor of m_1 and m_2. The problem asks to find the number R(n_1,n_2)."

Solve the problem proposed by Mr. A.

Входные данные

The input file consists of a single line having the values for n_1 and n_2, separated by exactly one space.

Выходные данные

For each test, the result will be written to standard output and consists of the value of R(n_1,n_2).

Пример

Входные данные #1
1 34
Выходные данные #1
561
Источник ACM SEERC 2013, SouthEastern European Region, October, 12/10/2013, Vinnica & Bucharest