#include<iostream>
#include<cstdio>
#include<algorithm>

using namespace std;

int main() {
    int arr[4];
    while(scanf("%d%d%d",&arr[0],&arr[1],&arr[2])!=EOF) {
        int a = arr[0],b=arr[1],c=arr[2];
        sort(arr,arr+3);
        if(arr[0] == 5 && arr[1] == 5 && arr[2] == 7) {
            printf("YES\n");
            printf("Using three phrases of length %d, %d and %d, it is possible to construct a Haiku.\n",a,b,c);
        }
        else {
            printf("NO\n");
        }
    }
    return 0;
}