#include <iostream>
#include <string.h>
using namespace std;


main ()
{

    string a;
    long long int br=0,i=0,p=1,brrr=0;
    cin>>a;
    while(i<a.size())
    {

        if(a[i]==a[i+1]) {br++;}
        else
        {
            brrr++;
            if(brrr!=26) br++;
            cout<<i<<";"<<br<<" ";
            if(br!=0)
            p*=br;
            cout<<p<<endl;
            br=0;
        }
        i++;
    }
    cout<<endl<<p%(10000000000+7);


}