{"raw_statement":[{"iden":"statement","content":"Malek registered n courses for the summer semester. Malek has a success rate m, which means he has to succeed at least in ceil(n × m) courses out of the n courses, in order to consider the summer semester as a successful semester. Malek is considered successful in the ith course, if his grade on this course was greater than or equal to 50.\n\nceil(x) is the smallest integer greater than or equal to x. For example, ceil(0.95) = 1, ceil(4) = 4, and ceil(7.001) = 8.\n\nMalek will give you his grades in the n courses, and your task is to tell him whether the summer semester was a successful semester or not.\n\nThe first line contains an integer T (1 ≤ T ≤ 100), where T is the number of test cases.\n\nThe first line of each test case contains an integer n and a real number m (1 ≤ n ≤ 100) (0 < m < 1), where n is the number of courses, and m is the required success rate.\n\nThe second line contains n integers a1, a2, ..., an (0 ≤ ai ≤ 100), where ai is the grade of the ith course.\n\nThe success rate m is given with exactly two digits after the decimal point.\n\nFor each test case, print a single line containing \"_YES_\" (without quotes), if the summer semester was a successful semester for Malek. Otherwise, print \"_NO_\" (without quotes).\n\n"},{"iden":"input","content":"The first line contains an integer T (1 ≤ T ≤ 100), where T is the number of test cases.The first line of each test case contains an integer n and a real number m (1 ≤ n ≤ 100) (0 < m < 1), where n is the number of courses, and m is the required success rate.The second line contains n integers a1, a2, ..., an (0 ≤ ai ≤ 100), where ai is the grade of the ith course.The success rate m is given with exactly two digits after the decimal point."},{"iden":"output","content":"For each test case, print a single line containing \"_YES_\" (without quotes), if the summer semester was a successful semester for Malek. Otherwise, print \"_NO_\" (without quotes)."}],"translated_statement":null,"sample_group":[],"show_order":[],"formal_statement":"**Definitions**  \nLet $ T \\in \\mathbb{Z} $ be the number of test cases.  \nLet $ \\mathcal{T} = \\{ (n_k, m_k, A_k) \\mid k \\in \\{1, \\dots, T\\} \\} $ be the set of test cases, where for each $ k $:  \n- $ n_k \\in \\mathbb{Z} $ is the number of courses,  \n- $ m_k \\in \\mathbb{R} $ is the required success rate,  \n- $ A_k = (a_{k,1}, a_{k,2}, \\dots, a_{k,n_k}) $ is a sequence of grades, with $ a_{k,i} \\in \\mathbb{Z} $.  \n\n**Constraints**  \n1. $ 1 \\le T \\le 100 $  \n2. For each $ k \\in \\{1, \\dots, T\\} $:  \n   - $ 1 \\le n_k \\le 100 $  \n   - $ 0 < m_k < 1 $, with exactly two decimal digits  \n   - $ 0 \\le a_{k,i} \\le 100 $ for all $ i \\in \\{1, \\dots, n_k\\} $  \n\n**Objective**  \nFor each test case $ k $, define:  \n- $ s_k = \\left| \\left\\{ i \\in \\{1, \\dots, n_k\\} \\mid a_{k,i} \\ge 50 \\right\\} \\right| $: the number of courses in which Malek succeeded.  \n- $ c_k = \\lceil n_k \\cdot m_k \\rceil $: the minimum number of required successful courses.  \n\nOutput \"YES\" if $ s_k \\ge c_k $, otherwise output \"NO\".","simple_statement":"Malek took n courses. He needs to pass at least ceil(n * m) courses to succeed, where passing means scoring at least 50. Given his grades, check if he succeeded.","has_page_source":false}