readLine()!
var D = [Int: Int]()
readLine()!.characters.split(" ").map({Int(String($0))!}).forEach {
  D[$0] = (D[$0] ?? 0) + 1
}
readLine()!
var T = [Int: Int]()
readLine()!.characters.split(" ").map({Int(String($0))!}).forEach {
  T[$0] = (T[$0] ?? 0) + 1
}
var ans = "YES"
for i in T.keys {
  if D[i] < T[i] {
    ans = "NO"
    break
  }
}
print(ans)