##### ###### ##### ### # # ### # # ###### ## ## ## ## ## ## ## # # # # # ## ##### #### ##### # # # # # # # #### ## # ## ## ## ## # # # # # ## ## # ###### ## ### # ### # ######
##### ###### ##### ### # # ### # # ###### ## ## ## ## ## ## ## # # # # # ## ##### #### ##### # # # # # # # #### ## # ## ## ## ## # # # # # ## ## # ###### ## ### # ### # ######
##### ###### ##### ### # # ### # # ###### ## ## ## ## ## ## ## # # # # # ## ##### #### ##### # # # # # # # #### ## # ## ## ## ## # # # # # ## ## # ###### ## ### # ### # ######
You are given two arrays and .
An interval with is called beautiful if it is possible to make for every using the following operation any number of times:
Choose an index such that , then decrease by and increase by .
The operation affects only the current interval .
For each test case, output the number of beautiful intervals.
The only beautiful interval is , because the two arrays are already equal there.
The only beautiful interval is . By applying the operation once, the first element decreases by and the second element increases by .
The only beautiful interval is . Apply the operation twice with , then once with .
The beautiful intervals are , , and .