1290 数豆豆


Submit solution

Points: 100
Time limit: 1.0s
Memory limit: 32M

Problem types
Allowed languages
C, C++, Java, Python

Description

星期天,小明和小伙伴一起去踢球,不小心打碎了邻居家的玻璃。回到家小明的妈妈非常生气,拿出了一罐豆豆,有红豆也有绿豆,她说小明要把红豆绿豆分开,并数出各有多少才可以吃晚饭。小明也知道错了,就让我们帮帮他吧!

Input

有多组测试数据,每组由a、b两种字符组成的字串(中间无空格),a、b分别表示红豆和绿豆。

Output

输出红,绿豆的个数,红、绿豆数之间空一格,每个答案占一行。

Sample

Input

babbbbbbaaaaa
aabbabab

Output

6 7
4 4

Source: 杨海华


Comments

There are no comments at the moment.