data = [input() for i in range(3)]
row_1 = [int(i) for i in data[1].split()]
row_2 = [int(i) for i in data[2].split()]
row_1.sort()
row_2.sort()
print(row_1)
print(row_2)
index_1 = 0
index_2 = 0
while index_1 < len(row_1) and index_2 < len(row_2):
    if row_1[index_1] == row_2[index_2]:
        index_1 += 1
        index_2 += 1
    else:
        index_1 += 1

if index_2 == len(row_2):
    print("Yes")
else:
    print("No")