Find out number of distinct ways such that:
(a + 2b + c) % (x + y + 2z) = 0, where 1<=a,b,c,x,y,z<=N
Constraints: 1<=N<=1000
Input: 1 2
Output: 1 15