408404: GYM103114 H Hsueh- and Meeting
Description
When you first joined the ACM Lab, you were full of ambition, but you always lying in bed eating potato chips, watching anime, and planning your future training plan and goals. As a result, an immature ACMer was stumbled by the sluggish life. On this day, Your senior, gold medal player Hsueh can't bear your depraved and degraded life. In order to revive the glory of ACM Lab in HZNU, he decided to hold a temporary meeting to remind everyone.
Due to the prevention and control of the COVID-19, everyone must sit apart when they come to the conference room.In other words, there at least one empty seat between two people. Assuming that there is a large round table in the conference classroom, you are required to judge whether it can accommodate all laboratory members. If so, output the total number of seating plans; otherwise, output $$$0$$$.
Since the answer can be very large, you have output it modulo $$$10^9+7$$$.
InputThe first line contains one integer $$$T(1 \leq T \leq 100)$$$, which represents the number of test case.
For each test case, the first line consists of two integers $$$n,m (1 \leq n,m \leq 10^5)$$$, the number of people in the laboratory and the number of seats in the meeting room. Each person and seat is considered to be different.
OutputFor each test case, output an integer representing the total number of different seating plans.
ExampleInput1 2 4Output
4