#include <stdio.h>
#include <stdlib.h>
#include <string.h>



int is_anagram(char *s1, char *s2) {
    // TODO: implement this function
    return 0;
}


int main(void) {
    char s1[1000];
    if (fgets(s1, sizeof s1, stdin) == NULL) { s1[0] = '\0'; }
    s1[strcspn(s1, "\n")] = '\0';
    char s2[1000];
    if (fgets(s2, sizeof s2, stdin) == NULL) { s2[0] = '\0'; }
    s2[strcspn(s2, "\n")] = '\0';
    printf("%d\n", is_anagram(s1, s2));
    return 0;
}
