#include<bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int,int>;
int m,d;
int mon[13]={-1,31,29,31,30,31,30,31,31,30,31,30,31};
string lis[7]={"Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"};
void solve(){
cin>>m>>d;
// 4.2 1
int dy = -2;
for(int i = 4;i<m;i++){
dy+=mon[i];
}
dy+=d;
cout<<lis[(dy%7)];
}
int main(){
ios::sync_with_stdio(false);
cin.tie(nullptr);
cout.tie(nullptr);
solve();
return 0;
}