{"scoring":null,"notes":"In the first example test, the table is already flat, no pad is needed.\r\n\r\nIn the second example test, Alice can apply the pad to the third leg to make the table flat.\r\n\r\nIn the third and the fourth example tests, Alice can not make her table flat.","legend":"Alice is a proud owner of a four-legged table, and she wants her table to be flat. Alice considers the table to be flat if its four legs have equal lengths. \r\n\r\nAlice measured the table's current leg lengths and got $a_1, a_2, a_3$, and $a_4$. She also has a pad of length $b$. Alice can attach the pad to one of the legs, in which case the length of that leg will increase by $b$. She can also decide not to attach the pad, in which case the lengths of the legs will not change. Note that Alice has just a single pad, so she can neither apply it twice to the same leg nor apply it to two different legs.\r\n\r\nFind out whether Alice can make her table flat.","authorLogin":"tourist","language":"english","timeLimit":2000,"output":"Print $1$ if Alice can make her table flat, and $0$ otherwise.","inputFile":"stdin","outputFile":"stdout","input":"The input contains five positive integers $a_1, a_2, a_3, a_4$, and $b$, each on a separate line~--- the lengths of the table's legs, and the length of the pad Alice has ($1 \\le a_i, b \\le 100$).","authorName":"Gennady Korotkevich","sampleTests":[{"output":"1\r\n","input":"10\r\n10\r\n10\r\n10\r\n5\r\n","inputFile":"example.01","outputFile":"example.01.a"},{"output":"1\r\n","input":"13\r\n13\r\n5\r\n13\r\n8\r\n","inputFile":"example.02","outputFile":"example.02.a"},{"output":"0\r\n","input":"50\r\n42\r\n42\r\n50\r\n8\r\n","inputFile":"example.03","outputFile":"example.03.a"},{"output":"0\r\n","input":"20\r\n40\r\n10\r\n30\r\n2\r\n","inputFile":"example.04","outputFile":"example.04.a"}],"name":"Absolutely Flat","interaction":null,"memoryLimit":536870912,"tutorial":"{\r\n    \\parindent=1cm\r\n    \\begin{tabular}{l@{\\extracolsep{1cm}}l}\r\n         Идея: & Дмитрий Штукенберг\\\\\r\n         Разработка: & Геннадий Короткевич\\\\\r\n     \\end{tabular}\r\n}\r\n\r\nНужно проверить оба случая, описанные в условии задачи.\r\n\r\nЕсли $a_1 = a_2 = a_3 = a_4$, то стол уже ровный и ответ равен $1$.\r\n\r\nИначе можно вручную проверить четыре случая~--- четыре варианта, под какую ножку положим подкладку. Но также можно поступить и проще: упорядочим ножки по неубыванию, чтобы выполнялось условие $a_1 \\le a_2 \\le a_3 \\le a_4$, и поймём, что удлинять есть смысл только самую короткую ножку. Поэтому проверим, что $a_1 + b = a_2 = a_3 = a_4$, и выведем $1$, если это так, и $0$ иначе."}