print/^13+$/?y/3//:-1for<>