import sys sys.setrecursionlimit(1000000000) # # Solution Template for Robot Writing # # Australian Informatics Olympiad 2025 # # This file is provided to assist with reading of input and writing of output # for the problem. You may modify this file however you wish, or # you may choose not to use this file at all. # # N is the number of tiles. N = 0 # T contains the values on the tiles. Note that the list starts from 0, and so # the values are T[0] to T[N-1]. T = [] # M is the length of target sequence. M = 0 # S contains the target sequence. Note that the list starts from 0, and so the # values are S[0] to S[M-1]. S = [] # Read the values of N, S, M, and T. N = int(input().strip()) T = list(map(int, input().strip().split())) M = int(input().strip()) S = list(map(int, input().strip().split())) # TODO: This is where you should compute your solution. You should output YES # or NO depending on whether it is possible for the robot to output the target # sequence. An example of how to output YES is shown below. print("YES")