#include <stdio.h> int main() { int a, b; int i; int arr1[] = {1, 3, 5, 7, 8, 10, 12}; int arr2[] = {4, 6, 9, 11}; while (scanf("%d%d", &a, &b) != EOF) { for (i = 0; i <= 6; i++) { if (b == arr1[i]) { printf("31\n"); } els...