let rec for_fold a b v f = if a >= b then v else for_fold (a+1) b (f v a) f
let s = Scanf.scanf "%s" (fun x -> x)
let n = String.length s
let solve k1 k2 = begin
  if s.[n-1] = '1' then k1 () else
  let ok = for_fold 0 (n-1) true (fun b i -> b && s.[i] = s.[n-2-i]) in
  if s.[0] = '0' || not ok then k1 () else
  let rec constr acc r i =
    if i-1 > n/2 then begin
      for_fold i (n+1) acc (fun acc j -> (r,j)::acc)
      |> List.rev
    end else
      if s.[i-2] = '1' then constr ((r,i)::acc) i (i+1)
      else constr ((r,i)::acc) r (i+1)
  in
  constr [] 1 2 |> k2
end
let () =
  solve (fun () -> print_endline "-1")
        (List.iter (fun (a,b) -> Printf.printf "%d %d\n" a b))
