Eva is playing a special "hide and seek" game with Colin. Dislike the traditional one, Eva picks a hidden positive integer xxx and let Colin guess.First Eva will tell Colin a positive integer aaa and she guarantees that x≤axle ax≤a .Then Eva will show Colin mmm constraints: each constraint is given by two non-negative integer bj,cjb_j,c_jbj,cj, meaning that bjmodx=cjb_j text{ } text{mod} text{ } x = c_j text{ } bjmodx=cj .Colin wants to enumerate all possible integers, but he don't know there are how many of them. Can you tell Colin how many positive integers can suit all constraints above?It's guaranteed there exists at least one integer which can suit all constraints above.
Eva is playing a special "hide and seek" game with Colin. Dislike the traditional one, Eva picks a hidden positive integer xxx and let Colin guess. First Eva will tell Colin a positive integer aaa and she guarantees that x≤axle ax≤a . Then Eva will show Colin mmm constraints: each constraint is given by two non-negative integer bj,cjb_j,c_jbj,cj, meaning that bj mod x=cj (1≤j≤m)b_j text{ } text{mod} text{ } x = c_j text{ } (1 le j le m)bj mod x=cj (1≤j≤m) . Colin wants to enumerate all possible integers, but he don't know there are how many of them. Can you tell Colin how many positive integers can suit all constraints above? It's guaranteed there exists at least one integer which can suit all constraints above.