import sys input = sys.stdin.readline N,M=map(int,input().split()) A=list(map(int,input().split())) P=list(map(int,input().split())) DP=[[0]*(M+1) for i in range(N+1)] DP[N][M]=1 for i in range(N-1,-1,-1): a=A[i] for j in range(M+1): if DP[i+1][j]==1: DP[i][j]=1 if j-a>=0: DP[i][j-a]=1 Q=[(P[i],i) for i in range(N)] Q.sort() now=0 last=-1 ANS=[] while now!=M: for _,i in Q: if i<=last: continue a=A[i] if now+a<=M and DP[i+1][now+a]==1: ANS.append(i+1) now+=a last=i break else: break if now==M: print(len(ANS)) print(*ANS) else: print(-1)