Problem: We call a string good, if after merging all the consecutive equal characters, the resulting string is palindrome. For example, "aabba" is good, because after the merging step it will become "aba".

Given a string, you have to find two values:

  1. the number of good substrings of even length; 
  2. the number of good substrings of odd length. 

Input

The first line of the input contains a single string of length n (1 ≤ n ≤ 105). Each character of the string will be either 'a' or 'b'.

Output

Print two space-separated integers: the number of good substrings of even length and the number of good substrings of odd length.

Examples

Input

bb


Output

1 2


Input

baab


Output

2 4


Input

babb


Output

2 5


Input

babaa


Output

2 7

Note

In example 1, there are three good substrings ("b", "b", and "bb"). One of them has even length and two of them have odd length.

In example 2, there are six good substrings (i.e. "b", "a", "a", "b", "aa", "baab"). Two of them have even length and four of them have odd length.

In example 3, there are seven good substrings (i.e. "b", "a", "b", "b", "bb", "bab", "babb"). Two of them have even length and five of them have odd length.

Definitions

A substring s[l, r] (1 ≤ l ≤ r ≤ n) of string s = s1s2... sn is string slsl + 1... sr.

A string s = s1s2... sn is a palindrome if it is equal to string snsn - 1... s1.

Solution (in JAVA):

Solution:
import java.util.InputMismatchException;
import java.math.BigInteger;
import java.io.*;
import java.util.*;

/**
 * Generated by Contest helper plug-in
 * Actual solution is at the bottom
 */

public class Main {
	public static void main(String[] args) {
		InputReader in = new StreamInputReader(System.in);
		PrintWriter out = new PrintWriter(System.out);
		run(in, out);
	}

	public static void run(InputReader in, PrintWriter out) {
		Solver solver = new Task();
		solver.solve(1, in, out);
		Exit.exit(in, out);
	}
}

abstract class InputReader {
	private boolean finished = false;

	public abstract int read();

	public long readLong() {
		return new BigInteger(readString()).longValue();
	}

	public int readInt() {
		int c = read();
		while (isSpaceChar(c))
			c = read();
		int sgn = 1;
		if (c == '-') {
			sgn = -1;
			c = read();
		}
		int res = 0;
		do {
			if (c < '0' || c > '9')
				throw new InputMismatchException();
			res *= 10;
			res += c - '0';
			c = read();
		} while (!isSpaceChar(c));
		return res * sgn;
	}
	
	
	
	public ArrayList<Integer> getnums() {
		ArrayList<Integer> nums = new ArrayList<Integer>();
		int l = 1;
		int c = read();
		while (!isSpaceChar(c)) {
			int d = read();
			if (d==c)
				l++;
			else {
				c = d;
				nums.add(l);
				l = 1;
			}
		}
		return nums;
	}

	public String readString() {
		int c = read();
		while (isSpaceChar(c))
			c = read();
		StringBuffer res = new StringBuffer();
		do {
			res.appendCodePoint(c);
			c = read();
		} while (!isSpaceChar(c));
		return res.toString();
	}

	private boolean isSpaceChar(int c) {
		return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
	}

	public void setFinished(boolean finished) {
		this.finished = finished;
	}

	public abstract void close();
}

class StreamInputReader extends InputReader {
	private InputStream stream;
	private byte[] buf = new byte[1024];
	private int curChar, numChars;

	public StreamInputReader(InputStream stream) {
		this.stream = stream;
	}

	public int read() {
		if (numChars == -1)
			throw new InputMismatchException();
		if (curChar >= numChars) {
			curChar = 0;
			try {
				numChars = stream.read(buf);
			} catch (IOException e) {
				throw new InputMismatchException();
			}
			if (numChars <= 0)
				return -1;
		}
		return buf[curChar++];
	}

	public void close() {
		try {
			stream.close();
		} catch (IOException ignored) {
		}
	}
}

class Exit {
	private Exit() {
	}

	public static void exit(InputReader in, PrintWriter out) {
		in.setFinished(true);
		in.close();
		out.close();
	}
}

interface Solver {
	public void solve(int testNumber, InputReader in, PrintWriter out);
}

class Task implements Solver {
	public void solve(int testNumber, InputReader in, PrintWriter out) {
		
		//ArrayList<Integer> nums = in.getnums();
		String ab = in.readString();
		
		int[] a = new int[2];
		int[] b = new int[2];
		
		long odds = 0;
		long evens = 0;
		
		for (int i = 0; i<ab.length(); i++) {
			int par = i%2;
			int opar = (i+1)%2;
			boolean aa = ab.charAt(i)=='a';
			if (aa) {
				a[par]++;
				evens += a[opar];
				odds += a[par];
			} else {
				b[par]++;
				evens += b[opar];
				odds += b[par];
			}
		}
		
		
		
		
		/*
		for (int i = 0; i<nums.size(); i++) {
			int val = nums.get(i);
			if (val<3) {
				odds += val;
				evens += val-1;
			} else {
				odds += (val-1)*2;
				evens += (val-2)*2;
			}
			if (i<nums.size()-2) {
				int insum = -nums.get(i);
				for (int j = i+2; j<nums.size(); j+=2) {
					insum += nums.get(j-2) + nums.get(j-1);
					int num = nums.get(i)*nums.get(j);
					if (num%2!=0) {
						num--;
						if (insum%2==0)
							evens++;
						else
							odds++;		
					}
					evens += num/2;
					odds += num/2;
				}
			}
		}
		
		
		for (int i = 0; i<nums.size(); i++) {
			System.out.print(nums.get(i) + " ");
		}
		System.out.println();
		*/
		
		System.out.println(evens + " " + odds);
	}
}

///