#include	<iostream>

using namespace std;

int main(void) {
	while(1) {
		int mon, day;
		cin >> mon;
		
		if( cin.eof() )		break;
		
		cin >> day;
		
		for(int i = 1; i < mon; i++) {
			switch(i) {
			case 2:
				day += 29;
				break;
			case 4:
			case 6:
			case 9:
			case 11:
				day += 30;
				break;
			default:
				day += 31;
				break;
			}
		}
		
		switch(day % 7) {
		case 0:
			cout << "Wednesday" << endl;
			break;
		case 1:
			cout << "Thursday" << endl;
			break;
		case 2:
			cout << "Friday" << endl;
			break;
		case 3:
			cout << "Saturday" << endl;
			break;
		case 4:
			cout << "Sunday" << endl;
			break;
		case 5:
			cout << "Monday" << endl;
			break;
		case 6:
			cout << "Tuesday" << endl;
			break;
		}
	}
	
	return 0;
}