import java.util.*;

public class h {

	public static void main(String[] args) {

		Scanner stdin = new Scanner(System.in);

		String s = stdin.next();
		int besti = -1, bestd = -1;



		while (!s.equals("END")) {

			toss best = new toss(s, 0, 1);

			for (int i=0; i<s.length(); i++) {
				for (int d=1; d<s.length(); d++) {

					if (i==0 && d ==1) continue;

					toss other = new toss(s, i, d);
					if (best.compareTo(other) < 0)
						best = other;
				}

			}

			System.out.println(best);
			s = stdin.next();
		}
	}

}

class toss {

	public int count;
	public int length;
	public int IP;
	public int distance;

	public toss(String s, int i, int d) {

		count = 0;
		IP = i;
		distance = d;
		while (i < s.length()) {
			length = i;
			if (s.charAt(i) != '.') {
				break;
			}
			else {
				count++;
				i += d;
			}
		}
	}

	public String toString() {
		return IP+" "+distance;
	}

	public int compareTo(toss other) {

		if (this.count != other.count)
			return this.count - other.count;

		if (this.length != other.length)
			return this.length - other.length;

		if (this.IP != other.IP)
			return this.IP - other.IP;

		return other.distance - this.distance;
	}
}