
IN = open('crystals.in')
n = int(IN.readline())
a = list(map(int, IN.readline().split()))
b = list(map(int, IN.readline().split()))

eq = lt = gt = None
for (i, aa, bb) in zip(range(1, n + 1), a, b):
    if aa == bb:
        eq = i
    if aa < bb:
        lt = i
    if aa > bb:
        gt = i

out = open('crystals.out', 'w')

if eq:
    print (1, file=out)
    print (eq, file=out)
elif lt and gt:
    print (2, file=out)
    print (lt, gt, file=out)
else:
    print (-1, file=out)
