{"trustable":true,"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\n\u003cscript\u003e\n window.katexOptions \u003d {\n delimiters: [\n {left: \u0027$$$$$$\u0027, right: \u0027$$$$$$\u0027, display: true},\n {left: \u0027$$$\u0027, right: \u0027$$$\u0027, display: false},\n {left: \u0027$$\u0027, right: \u0027$$\u0027, display: true},\n {left: \u0027$\u0027, right: \u0027$\u0027, display: false}\n ]\n };\n\u003c/script\u003e\n","sections":[{"title":"","value":{"format":"HTML","content":"\u003cp\u003eA telephone number is a sequence of exactly \u003cspan class\u003d\"tex-font-style-tt\"\u003e11\u003c/span\u003e digits, where the first digit is \u003cspan class\u003d\"tex-font-style-tt\"\u003e8\u003c/span\u003e. For example, the sequence \u003cspan class\u003d\"tex-font-style-tt\"\u003e80011223388\u003c/span\u003e is a telephone number, but the sequences \u003cspan class\u003d\"tex-font-style-tt\"\u003e70011223388\u003c/span\u003e and \u003cspan class\u003d\"tex-font-style-tt\"\u003e80000011223388\u003c/span\u003e are not.\u003c/p\u003e\u003cp\u003eYou are given a string $$$s$$$ of length $$$n$$$, consisting of digits.\u003c/p\u003e\u003cp\u003eIn one operation you can delete any character from string $$$s$$$. For example, it is possible to obtain strings \u003cspan class\u003d\"tex-font-style-tt\"\u003e112\u003c/span\u003e, \u003cspan class\u003d\"tex-font-style-tt\"\u003e111\u003c/span\u003e or \u003cspan class\u003d\"tex-font-style-tt\"\u003e121\u003c/span\u003e from string \u003cspan class\u003d\"tex-font-style-tt\"\u003e1121\u003c/span\u003e.\u003c/p\u003e\u003cp\u003eYou need to determine whether there is such a sequence of operations (possibly empty), after which the string $$$s$$$ becomes a telephone number.\u003c/p\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003cp\u003eThe first line contains one integer $$$t$$$ ($$$1 \\le t \\le 100$$$) — the number of test cases.\u003c/p\u003e\u003cp\u003eThe first line of each test case contains one integer $$$n$$$ ($$$1 \\le n \\le 100$$$) — the length of string $$$s$$$.\u003c/p\u003e\u003cp\u003eThe second line of each test case contains the string $$$s$$$ ($$$|s| \u003d n$$$) consisting of digits.\u003c/p\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u003cp\u003eFor each test print one line.\u003c/p\u003e\u003cp\u003eIf there is a sequence of operations, after which $$$s$$$ becomes a telephone number, print \u003cspan class\u003d\"tex-font-style-tt\"\u003eYES\u003c/span\u003e.\u003c/p\u003e\u003cp\u003eOtherwise, print \u003cspan class\u003d\"tex-font-style-tt\"\u003eNO\u003c/span\u003e.\u003c/p\u003e"}},{"title":"Examples","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\u003e2\n13\n7818005553535\n11\n31415926535\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eYES\nNO\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}},{"title":"Note","value":{"format":"HTML","content":"\u003cp\u003eIn the first test case you need to delete the first and the third digits. Then the string \u003cspan class\u003d\"tex-font-style-tt\"\u003e7818005553535\u003c/span\u003e becomes \u003cspan class\u003d\"tex-font-style-tt\"\u003e88005553535\u003c/span\u003e.\u003c/p\u003e"}}]}