Rick gave Morty an array A of N integers. Now, Rick wants Morty to solve his queries as quickly as possible. If Morty doesn't solve these queries on time, Rick will convert Morty into a Pickle. Morty is in great pain, Please help him as he doesn't know how to solve these queries.
Rick's queries are of the following two types:
Input format
Output format
Constraints