Easy Tiling Problem

Given an N × M rectangle, compute the number of tilings (complete coverings) with the following piece with 4 blocks (on the left): Note that the piece can be rotated and flipped but not cut. An example tiling of an 8 × 8 rectangle is given above right. Input Anumberofofinputs(≤100),eachlinewithN andM (4≤N ≤24,4≤M ≤109). Additionally,we stipulate the condition that both N and M are integer multiples of 4 (i.e. 4|N and 4|M). Output For each input, output the answer modulo 1000000007 on one line. Sample Input 44 48 Sample Output 2 6