SP7488 LGLOVE - LCM GCD Love
Description
Bob fell in love with LCM and GCD. So much that he started seeing LCMs and GCDs everywhere.
Betty, his girl friend was jealous and she gave Bob an array A\[ \] of integers, which had nothing to do with LCMs or GCDs.
Quickly, naughty Bob evaluated a new array B\[ \] containing n integers, such that B\[i\] is LCM(1,2,3,...,A\[i\]), A\[i\]>0. When A\[i\] is 0, B\[i\] is also 0.
Angry Betty decided to give m queries to Bob, each being one of the following type:
\- "0 i j p", meaning add 'p' to each element in A\[i..j\]. -300000
Input Format
First line contains n(n
Output Format
Output one line for each query of type 1 or 2, modulo 1000000007.