#include #define rep(i,a,n) for (int i = a;i < n;i++) #define per(i,n,a) for (int i = n-1;i >= a;i--) using namespace std; int main() { int a0, b0, c0; int a1, b1, c1; cin >> a0 >> b0 >> c0; cin >> a1 >> b1 >> c1; if (a0 * 100000 + b0 * 1000 + c0 >= a1 * 100000 + b1 * 1000 + c1){ cout << "YES" << endl; }else{ cout << "NO" << endl; } }