#include using namespace std; int main(){ int A,B,C,D; cin>>A>>B>>C>>D; if(AD)puts("YES"); else puts("NO"); }