#include<iostream>

using namespace std;

int main()
{
	int month[12];

	month[0]=31;
	month[1]=29;
	month[2]=31;
	month[3]=30;
	month[4]=31;
	month[5]=30;
	month[6]=31;
	month[7]=31;
	month[8]=30;
	month[9]=31;
	month[10]=30;
	month[11]=31;

	int hoge,fuge;

	cin >> hoge >> fuga;

	int i;
	int count=0;

	if(hoge!=0)
	{
		for(i=0;i<hoge-1;i++)
		{
			count+=month[i];
		}	
		
		count+=fuga;
	
		flag = count % 7;
		if(flag==0)
		{
			cout << "Wednesday" <<endl;
		}
		if(fkag==1)
		{
			cout << "Thursday" <<endl;
		}
		if(fkag==2)
		{
			cout << "Friday" <<endl;
		}
		if(fkag==3)
		{
			cout << "Saturday" <<endl;
		}
		if(fkag==4)
		{
			cout << "Sunday" <<endl;
		}
		if(fkag==5)
		{
			cout << "Monday" <<endl;
		}
		if(fkag==6)
		{
			cout << "Tuesday" <<endl;
		}
	}
}