favorite We need a little bit of your help to keep things running, click on this banner to learn more
Competitions

# Indexes of spaces

Find the indexes of the first and the last spaces in the given string, if the first character has index "0"..

#### Input

One line of text, consisting only of Latin letters, punctuation marks and spaces.

#### Output

Print the indexes of the first and the last spaces. If there are no spaces in the line, print -1.

Time limit 1 second
Memory limit 128 MiB
Input example #1
I am programming on Python.

Output example #1
1 19

Input example #2
abrakadabra

Output example #2
-1

Author Matviychuk Sergiy Volodymyrovych
Source "ABC programming"