Fibonacci numbers#2421

Fibonacci numbers

1 second
128 megabytes
Easy

As is well known, the Fibonacci sequence is defined as follows:

F_0 = 0, \\ F_1 = 1, \\ F_n = F_{n - 1} + F_{n - 2}, \quad n > 1.

It is named after the Italian mathematician Leonardo Fibonacci, also known as Leonardo of Pisa.

Given two integers and , find the greatest common divisor of F_n and F_m.

Input

Each line represents a single test case and contains two integers and m~(1 \le n, m \le 10^{18}). The number of test cases does not exceed .

Output

For each test case, print on a separate line the value of GCD(F_n, F_m) modulo 10^8.

Examples

Example 1

Loading
Loading