4421: Sum Them
          内存限制:128 MB
          时间限制:1 S
          
          
          
          标准输入输出
      
      
          题目类型:传统
          评测方式:Special Judge
          上传者:
      
      
          提交:26
          通过:5
      
题目描述
	Given n and m, calculate the sum of the incremental multiplication formulas: 
	
 
输入格式
	No more than 50 test cases. Each case one line, including integer n and m. 
	1 ≤ n, m ≤ 106. 
输出格式
For each test case, output the result of f (n, m) modulo 109 + 7.
        输入样例 复制
2 2
98 3输出样例 复制
8
24497550