{"trustable":false,"sections":[{"title":"","value":{"format":"HTML","content":"\u003ctable width\u003d\"95%\"\u003e\r\n\t\u003ctbody\u003e\r\n\t\t\u003ctr\u003e\r\n\t\t\t\u003ctd\u003e\r\n\t\t\t\t\u003cp align\u003d\"JUSTIFY\"\u003e\r\n\t\t\t\t\tThere is an equation ax + by + c \u003d 0. Given a,b,c,x1,x2,y1,y2 you must determine, how many integer roots of this equation are satisfy to the following conditions : x1\u0026lt;\u003dx\u0026lt;\u003dx2, \u0026nbsp; y1\u0026lt;\u003dy\u0026lt;\u003dy2. Integer root of this equation is a pair of integer numbers (x,y).\u003c/p\u003e\r\n\t\t\t\u003c/td\u003e\r\n\t\t\u003c/tr\u003e\r\n\t\u003c/tbody\u003e\r\n\u003c/table\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003cp\u003e\r\n\tInput contains integer numbers a,\u003cspan\u003eb\u003c/span\u003e,\u003cspan\u003ec\u003c/span\u003e,\u003cspan\u003ex1\u003c/span\u003e,\u003cspan\u003ex2\u003c/span\u003e,\u003cspan\u003ey1\u003c/span\u003e,\u003cspan\u003ey2\u003c/span\u003e delimited by spaces and line breaks. All numbers are not greater than 10\u003csup\u003e8\u003c/sup\u003e by absolute value。\u003c/p\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u003cp\u003e\r\n\tWrite answer to the output.\u003c/p\u003e"}},{"title":"Sample Input","value":{"format":"HTML","content":"\u003cpre\u003e1 1 -3\r\n0 4\r\n0 4\r\n\u003c/pre\u003e"}},{"title":"Sample Output","value":{"format":"HTML","content":"\u003cpre\u003e4\r\n\u003c/pre\u003e"}}]}