def solve(N,M,A,P): DP=[[0]*(M+1) for _ in range(N+2)]; DP[-1][0]=1 for i in range(N,0,-1): D=DP[i]; E=DP[i+1] a=A[i] for x in range(M+1): if x0: for k in range(N): if (len(B)==0 or B[-1]=A[I[k]] and DP[I[k]][remain]==1: B.append(I[k]) remain-=A[I[k]] return B #================================================== N,M=map(int,input().split()) A=[-1]+list(map(int,input().split())) P=[-1]+list(map(int,input().split())) B=solve(N,M,A,P) if B==None: print(-1) else: print(len(B)) print(*B)