{"trustable":true,"prependHtml":"\u003cscript\u003e window.katexOptions \u003d { disable: true }; \u003c/script\u003e\n\u003cscript type\u003d\"text/x-mathjax-config\"\u003e\n MathJax.Hub.Config({\n tex2jax: {\n inlineMath: [[\u0027$$$\u0027,\u0027$$$\u0027], [\u0027$\u0027,\u0027$\u0027]],\n displayMath: [[\u0027$$$$$$\u0027,\u0027$$$$$$\u0027], [\u0027$$\u0027,\u0027$$\u0027]]\n }\n });\n\u003c/script\u003e\n\u003cscript async src\u003d\"https://mathjax.codeforces.org/MathJax.js?config\u003dTeX-AMS-MML_HTMLorMML\" type\u003d\"text/javascript\"\u003e\u003c/script\u003e","sections":[{"title":"","value":{"format":"HTML","content":"\u003cdiv class\u003d\"panel_content\"\u003eWNJXYK hates Destinys so that he does not want to meet him at any time. Luckily, their classrooms and dormitories are at different places. The only chance for them to meet each other is on their way to classrooms from dormitories. \u003cbr\u003eTo simple this question, we can assume that the map of school is a normal rectangular 2D net. WNJXYK’s dormitory located at (0,y1) and his classroom located at (x1,0). Destinys’s dormitory located at (0,y2) and his classroom is located at (x2,0). On their way to classrooms, they can do two kinds of movement : (x,y)-\u0026gt;(x,y-1) and (x,y)-\u0026gt;(x+1,y). \u003cbr\u003eWNJXYK does not want to meet Destinys so that he thinks that it is not \u003cb\u003esafe\u003c/b\u003e to let his path to classroom from dormitory has any intersect point with Destinys ‘s. And then he wonders how many different paths for WNJXYK and Destinys arriving their classrooms from dormitories \u003cb\u003esafely\u003c/b\u003e.\u003c/div\u003e"}},{"title":"Input","value":{"format":"HTML","content":"The input starts with one line contains exactly one positive integer $T$ which is the number of test cases.\u003cbr\u003eEach test case contains one line with four positive integers $x1$,$x2$,$y1$,$y2$ which has been explained above."}},{"title":"Output","value":{"format":"HTML","content":"For each test case, output one line containing “y” where y is the number of different paths modulo 10^9+7."}},{"title":"Sample","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e3\r\n1 2 1 2\r\n2 3 2 4\r\n4 9 3 13\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e3\r\n60\r\n16886100\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}},{"title":"Hint","value":{"format":"HTML","content":"\u003cbr\u003eT\u0026lt;\u003d1000\u003cbr\u003ex1\u0026lt;x2,y1\u0026lt;y2\u003cbr\u003e0\u0026lt;x1,x2,y1,y2\u0026lt;\u003d100000\u003cbr\u003e"}}]}