QOJ.ac

QOJ

Limite de temps : 2.5 s Limite de mémoire : 500 MB Points totaux : 100

#7493. The Glory of This Very Moment

Statistiques

Chtholly gives you a sequence of length $n$ and $m$ queries. Each query asks for the number of divisors of the product of elements in a given range, modulo $19260817$.

Input

The first line contains two integers $n$ and $m$.

The second line contains $n$ integers representing the sequence $a_i$.

The following $m$ lines each contain two integers $l$ and $r$, representing the query range.

Output

Output $m$ lines, each containing an integer representing the answer.

Examples

Input 1

5 5
64 2 18 9 100
1 5
2 4
2 3
1 4
3 4

Output 1

165
15
9
45
10

Note

Idea: will7101, Solution: nzhtl1477, Code: nzhtl1477, Data: nzhtl1477

$1 \leq n, m \leq 10^5$, $1 \leq a_i \leq 10^9$.

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.