#include using namespace std; #define ll long long #define pll pair #define ff first #define ss second #define pb push_back const int mod = 1e9 + 7; int main() { ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); string s, t, c; cin >> s >> t >> c; if(c == "<"){ if(s < t) cout << "YES"; else cout << "NO"; } else if(c == ">"){ if(s > t) cout << "YES"; else cout << "NO"; } else { if(s == t) cout << "YES"; else cout << "NO"; } return 0; }