eolymp
bolt
Try our new interface for solving problems
Problems

Dogs and monkeys

Dogs and monkeys

Time limit 1 second
Memory limit 128 MiB

Barish has n dogs and m monkeys. He wants to line them up. But he doesn't want to put two dogs or two monkeys together, because in this case they start to fight. How many different arrangements exists, such that neither the monkeys nor the dogs fight. Print the answer modulo 10^9 + 7. Keep in mind that dogs and monkeys are different.

Input data

Two integers n and m~(1 \le n, m \le 10^5).

Output data

Print the number of different ways to arrange monkeys and dogs modulo 10^9 + 7.

Examples

Input example #1
2 2
Output example #1
8
Input example #2
3 2
Output example #2
12
Input example #3
1 8
Output example #3
0
Author Rashad Mammadov, Abutalib Namazov
Source Azərbaycan 2019: Yuxarı yaş olimpiada hazırlığı qrupuna seçim turu