#include <stdio.h>
#include <ctype.h>

int main() {
    char ch;
    int letters = 0, digits = 0;

    while ((ch = getchar()) != EOF) {
        if (isalpha(ch)) {
            letters++;
        } else if (isdigit(ch)) {
            digits++;
        }
    }

    printf("%d %d\n", letters, digits);

    return 0;
}
