P5071 [Ynoi Easy Round 2015] The Glory of This Moment

Background

Could it be... So that means... for Chtholly and the others... What is bringing Chtholly pain is... ![](https://cdn.luogu.com.cn/upload/pic/45561.png) 【William?】 【William, seriously, what happened to you?】 【What’s wrong?】 【Ah...】 ![](https://cdn.luogu.com.cn/upload/pic/45562.png) Aren’t you panicking? 【Don’t be fooled by how I look, my heart is indeed pounding】 【But, even though I don’t know what happened】 ![](https://cdn.luogu.com.cn/upload/pic/45563.png) 【You, who always like to act tough, are finally showing me a weak side for once~】 【The happiness, and the feeling of wanting you to cheer up, added together】 【Far outweigh the feeling of panic】 ![](https://cdn.luogu.com.cn/upload/pic/45564.png) You... 【Just now, you had this look like you’d disappear by yourself if nobody cared about you, you know?】 【Although it’s very embarrassing, I really can’t just leave you alone】 ![](https://cdn.luogu.com.cn/upload/pic/45565.png) You are... a good woman... ![](https://cdn.luogu.com.cn/upload/pic/45567.png) 【Sorry, I didn’t hear clearly. Say that again.】 It’s nothing... ![](https://cdn.luogu.com.cn/upload/pic/45568.png) 【Ah... you’re still forcing yourself】 【Say it again. Just say it again.】 Marry me. ![](https://cdn.luogu.com.cn/upload/pic/45569.png) 【No... huh?】 I finally found it. I found someone I long to protect. I found a home I long to return to. I feel like I can keep living. At last, I truly realized that I still have the value and the right to keep living. So... I will give you happiness. ![](https://cdn.luogu.com.cn/upload/pic/45570.png) 【Mm.】 【I won’t leave your side either.】 【Forever, forever, I’ll be with you.】

Description

Chtholly gives you a sequence of length $n$. There are $m$ queries. For each query, you need to compute the number of divisors of the product of a subarray, taken $\bmod 19260817$.

Input Format

The first line contains two integers $n, m$. The second line contains $n$ integers, representing the sequence $a_i$. Then follow $m$ lines, each containing two integers $l, r$, representing the queried interval.

Output Format

Output $m$ lines. Each line contains one integer, the answer to the corresponding query.

Explanation/Hint

Idea: will7101, Solution: nzhtl1477, Code: nzhtl1477, Data: nzhtl1477. Constraints: $1 \leq n, m \leq 10^5$, $1 \leq a_i \leq 10^9$. Translated by ChatGPT 5