Tomorrow there is a match between Manshester United (ManUtd) and Real Madras (RM). Now, ManUtd fanboy hardik is in depression as his team is in a pretty bad form this season (as in all seasons..:)). Hardik went to Sanket for help. Sanket, being the god, told him that If he solves the below problem, ManUtd will win..!! (Godly powers).
Hardik will be given match statistics of a team. A team can get points based on the result of the match: win, tie or loss. If a team wins, it achieves 5 points, a tie can give 1 point and a loss can give no points (0 points).
Given the total matches that team played and number of points that team earned, output total possible combinations of wins, ties and losses that team could have faced to achieve that total points.
See the sample case for better understanding.
Input format:
First line consist of number of testcases T.
Each of the next T lines consist of two numbers: X (total games played by team) and Y (total points earned).
Output format:
For each case, output one line that contains the total number of combinations of wins, ties and losses that team could have gotten to achieve that total points.
Constraints:
1 <= T <= 10^5
1 <= X <= 10^18
0 <= Y <= 10^18