{"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\"\u003eThere are some water, milk and wine in your kitchen. Your naughty little sister made some strange drinks by mixing them together, and then adds some sugar! She wants to know whether they taste good, but she doesn\u0027t want to try them herself. She needs your help.\u003cbr\u003e\u003cbr\u003eYour sister knows that you don\u0027t want to drink them either (anyone wants to?), so she gives you a chance to escape: if you can guess the price of a special drink, she gives you freedom. Warning: she loves her special drink so much that you should never under-estimate its cost! That is, you\u0027re to find the most expensive possible price of it.\u003cbr\u003e\u003cbr\u003eThe price of each drink equals to its cost. If the amounts of water, milk, wine and sugar used in the drink are a1, a2, a3 and a4 respectively, and the unit costs of water, milk, wine and sugar are c1, c2, c3 and c4 respectively, then the drink costs a1c1 + a2c2 + a3c3 + a4c4 . To give you some hope to win, she told you the costs of exactly n ordinary drinks. Furthermore, she promised that the total cost of sugar a4c4 is always a real number in the interval [L, R] , in any drink.\u003cbr\u003e\u003cbr\u003eSadly, you don\u0027t know the exact price of anything (you\u0027re a programmer, not a housewife!), but you know that water is the cheapest; wine is the most expensive, i.e., 0\u0026lt;\u003dc1\u0026lt;\u003dc2\u0026lt;\u003dc3 . Then the best thing you can do is to assume units costs can be any real numbers satisfying this inequality.\u003cbr\u003e\u003cbr\u003eWrite a program to find the highest possible price of the special drink. \u003c/div\u003e"}},{"title":"Input","value":{"format":"HTML","content":"The input contains several test cases. The first line of each test case contains three positive integers n, L, R (1\u0026lt;\u003dn\u0026lt;\u003d100, 0\u0026lt;\u003dL\u0026lt;\u003dR\u0026lt;\u003d100) . The next n lines each contain four non-negative integer a1, a2, a3 , p (0\u0026lt;\u003da1,a2,a3\u0026lt;\u003d100, 0\u0026lt;\u003dp\u0026lt;\u003d10000) , the amount of water, milk and wine, and the price. The last line of the case contains three integers a1, a2, a3 (0\u0026lt;\u003da1,a2,a3\u0026lt;\u003d100) , the drink to be estimated. The last test case is followed by a single zero, which should not be processed. "}},{"title":"Output","value":{"format":"HTML","content":"For each test case, print the case number and the highest possible price to four decimal places. If the input is selfcontradictory, output ``Inconsistent data\". If the price can be arbitrarily large, output ``Too expensive!\". "}},{"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\u003e1 3 5 \r\n1 2 3 10\r\n2 4 6 \r\n1 2 4 \r\n1 1 1 1\r\n1 1 1 \r\n1 3 8 \r\n0 1 0 17\r\n0 0 1 \r\n3 1 2 \r\n2 1 3 14\r\n1 5 1 15\r\n7 3 2 21\r\n4 1 6 \r\n2 0 2 \r\n45 31 53 4087\r\n30 16 1 1251\r\n11 51 34\r\n0\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eCase 1: 19.0000 \r\nCase 2: Inconsistent data \r\nCase 3: Too expensive! \r\nCase 4: 26.2338 \r\nCase 5: 3440.3088\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}