**Compilation/Execution Result:**

Pasha is obsessed with Prime Numbers. He has an array of N Numbers (1 based indexing). His friends keep asking him the number of primes in the subarray ranging from l to r (both inclusive). He is tired of answering them, and so asks for your help.

**Input:**

The First Line contains T- testcases.

The first line of each Testcase contains two integers -N(Size of the array)and Q(Number of Queries)

The next line contains N integers -denoting the array.

The next Q Lines contains two integers L and R.

**Output:**

For each test case, Answer the query on a new line.

**Constraints:
1<=T<=10
1<=N,Q<=1e6
1 ≤ L<=R ≤ N**

**Explanation:
Sample Input:**

1

5 3

2 5 6 7 8

1 3

2 5

3 3

**Sample Output:**

2

2

0

**Explanation:**

In the first query- THe Primes in the subarray [2,5,6] are 2 and 5.

In the Second query- THe Primes in the subarray [5,6,7,8] are 5 and 7.

In the Third query- THere is no Prime in the subarray [6].

surbhi_7 | 128 |

Rajat Thakur 2 | 115 |

John Carey | 92 |

shaktiman_shaktiman_shaktiman | 91 |

nancygarg258_pec | 90 |

Ibrahim Nash | 604 |

ashrepos | 490 |

RealHorror | 368 |

shaktiman_shaktiman_shaktiman | 363 |

shi143din | 343 |

akhayrutdinov | 4052 |

sanjay05 | 3406 |

Quandray | 2435 |

Michael Riegger | 2228 |

Jasleen Kaur 2 | 2012 |