for _ in range(int(input())): n = int(input()) ans = 0 not in map(int, input().split()) print('Yes' if ans else 'No')