Type: Default 1000ms 256MiB

数数

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

Problem Description

现在有四种物品,分别有 n1,n2,n3,n4 n_1,n_2,n_3,n_4 ,有多少种排列所有物品的方案使得任意两个相邻物品的种类不同。

Input Format

一行四个正整数 n1,n2,n3,n4 n_1,n_2,n_3,n_4 。

Output Format

输出一行一个整数表示方案数。对 109+7 10^9 + 7 取模。

Sample

Input

0 1 2 3

Output

10

Hint

$0 \leq n_1,n_2 \leq 200, 0 \leq n3,n4 \leq 5 \times 10^4$