#include<cstdio>

int main(){
	int a[] = {0,0,31,60,91,121,152,182,213,244,274,305,335,366};
	int m, d;
	char day[7][10] = {"Monday", "Tuesday", "Wednesday", "Thursday","Friday","Saturday","Sunday"};
	while(scanf("%d %d", &m, &d) + 1){
		printf("%s\n", day[(a[m] + d + 2) % 7]);
	}
}