INPUT n
DIM a(n)
FOR i = 1 TO n
INPUT a(i)
NEXT
FOR i = 1 TO n
IF a(i) = 0 THEN
IF f = 0 THEN q = i: f = 1 ELSE qn = i
END IF
NEXT
PRINT q, qn
INPUT n
DIM a(n)
FOR i = 1 TO n
INPUT a(i)
NEXT
FOR i = 1 TO n
IF a(i) = 0 THEN
IF f = 0 THEN q = i: f = 1 ELSE qn = i
END IF
NEXT
PRINT q, qn