#import <Foundation/Foundation.h>
#define $(...)  ([NSSet setWithArray: @[__VA_ARGS__]])
int main(){
    @autoreleasepool {
        int a,b,c,d;
        scanf("%d %d %d %d",&a,&b,&c,&d);
        NSSet *set = $(@(a),@(b),@(c),@(d));
        puts([set isEqualToSet:$(@1,@9,@7,@4)] ? "YES": "NO");
    }
}
