• + 0 comments

    def num(): n = int(input()) for _ in range (n): num=input().strip() if len (num)==10 and num[0] in "7,8,9" and num.isdigit(): print("YES") else: print("NO") num()