QOJ.ac

QOJ

Límite de tiempo: 1 s Límite de memoria: 1024 MB Puntuación total: 100

#3728. 2016

Estadísticas

Given positive integers $n$ and $m$, count the number of pairs of positive integers $(a, b)$ that satisfy the following conditions:

  1. $1 \leq a \leq n, 1 \leq b \leq m$;
  2. $a \times b$ is a multiple of $2016$.

Input

The input contains no more than $30$ test cases.

Each test case contains two integers $n, m$ ($1 \leq n, m \leq 10^9$).

Output

For each test case, output an integer representing the number of pairs that satisfy the conditions.

Examples

Input 1

32 63

Output 1

1

Input 2

2016 2016

Output 2

30576

Input 3

1000000000 1000000000

Output 3

7523146895502644

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.