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