#include using namespace std;int main(){vector>P;int A,B,C;char D;while(cin>>A>>D>>B>>D>>C)P.push_back({A,B,C}); cout<<(P[0]>=P[1]?"YES":"NO")<