{"trustable":false,"prependHtml":"\u003cstyle type\u003d\u0027text/css\u0027\u003e\n .input, .output {\n border: 1px solid #888888;\n }\n .output {\n margin-bottom: 1em;\n position: relative;\n top: -1px;\n }\n .output pre, .input pre {\n background-color: #EFEFEF;\n line-height: 1.25em;\n margin: 0;\n padding: 0.25em;\n }\n \u003c/style\u003e\n \u003clink rel\u003d\"stylesheet\" href\u003d\"//codeforces.org/s/96598/css/problem-statement.css\" type\u003d\"text/css\" /\u003e\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 type\u003d\"text/javascript\" async src\u003d\"https://mathjax.codeforces.org/MathJax.js?config\u003dTeX-AMS_HTML-full\"\u003e\u003c/script\u003e","sections":[{"title":"","value":{"format":"MD","content":"一年一度的中秋節又到了,淡旻和他的朋友賴稟一如往年的在月光下烤肉、賞月、吃月餅。吃著圓圓的月餅,看著圓圓的月亮,賴稟想到了一個使用同樣也是圓圓的硬幣玩的遊戲。\n\n淡旻和賴稟兩人輪流分別投擲 ***x*** 次及 ***y*** 次硬幣,投擲結果出現較多次正面的人就獲勝,並且可以得到再吃一個月餅的獎勵。而你身為他們的朋友,擔任的則是裁判的角色,負責記錄兩人在每次投擲結束後出現正面的次數。不過因為月亮實在太美了,你忘記了兩人最後的比數,只記得淡旻擲出了至少 ***a*** 次正面,而賴稟則擲出了至少 ***b*** 次正面,且最後比賽由淡旻獲勝。\n\n你的任務是推斷出所有可能的最終比數。"}},{"title":"Input","value":{"format":"MD","content":"輸入僅一行,包含四個由空白隔開的正整數 ***x***, ***y***, ***a***, ***b*** (1 ≤ ***a*** ≤ ***x*** ≤ 100, 1 ≤ ***b*** ≤ ***y*** ≤ 100)。"}},{"title":"Output","value":{"format":"MD","content":"輸出的第一行包含一整數 ***n*** ,表示有幾種可能的比賽結果。\n\n接下來 ***n*** 行,每行包含兩個由空白隔開的整數 ***c\u003csub\u003ei\u003c/sub\u003e***, ***d\u003csub\u003ei\u003c/sub\u003e***,依序表示第 ***i*** 種可能的比賽結果中,淡旻和賴稟兩人投擲到正面的次數。\n\n請以遞增方式輸出所有比賽可能。數對(***p\u003csub\u003e1\u003c/sub\u003e***, ***q\u003csub\u003e1\u003c/sub\u003e***)小於(***p\u003csub\u003e2\u003c/sub\u003e***, ***q\u003csub\u003e2\u003c/sub\u003e***)若 ***p\u003csub\u003e1\u003c/sub\u003e*** \u003c ***p\u003csub\u003e2\u003c/sub\u003e*** ,或 ***p\u003csub\u003e1\u003c/sub\u003e*** \u003d ***p\u003csub\u003e2\u003c/sub\u003e*** 且 ***q\u003csub\u003e1\u003c/sub\u003e*** \u003c ***q\u003csub\u003e2\u003c/sub\u003e*** 。"}},{"title":"Sample Input 1","value":{"format":"MD","content":"```\n3 2 1 1\n```"}},{"title":"Sample Output 1","value":{"format":"MD","content":"```\n3\n2 1\n3 1\n3 2\n```"}},{"title":"Sample Input 2","value":{"format":"MD","content":"```\n7 8 3 8\n```\n"}},{"title":"Sample Output","value":{"format":"MD","content":"```\n0\n```"}}]}