Indexes of spaces
Execution time limit is 1 second
Runtime memory usage limit is 128 megabytes
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.
Examples
Input #1
Answer #1
Input #2
Answer #2
Submissions 9K
Acceptance rate 49%