#include <bits/stdc++.h>   using namespace std;   int main() {     string s, t;     cin >> s >> t;     if (s ==  monday  && (t ==  thursday  || t ==  wednesday  || t ==  monday ))       cout <<  YES ;     else if (s ==  tuesday  &&              (t ==  friday  || t ==  thursday  || t ==  tuesday ))       cout <<  YES ;     else if (s ==  wednesday  &&              (t ==  friday  || t ==  saturday  || t ==  wednesday ))       cout <<  YES ;     else if (s ==  thursday  &&              (t ==  saturday  || t ==  sunday  || t ==  thursday ))       cout <<  YES ;     else if (s ==  friday  && (t ==  sunday  || t ==  monday  || t ==  friday ))       cout <<  YES ;     else if (s ==  saturday  &&              (t ==  monday  || t ==  tuesday  || t ==  saturday ))       cout <<  YES ;     else if (s ==  sunday  &&              (t ==  tuesday  || t ==  wednesday  || t ==  sunday ))       cout <<  YES ;     else       cout <<  NO ;     return 0;   }   