#include<cstdio>
#include<algorithm>
#include<cmath>
#include<cstring>
using namespace std;
int vis[5];
double a[5];
int dfs(int step)
{
if(step==4)
{
for(int i=1;i<=4;i++)
{
if(!vis[i])
{
if(fabs(a[i]-24)<0.0000001)
return 1;
}
}
return 0;
}
for(int i=1;i<=4;i++)
{
if(!vis[i])
for(int j=i+1;j<=4;j++)
{
if(!vis[j])
{
vis[j]=1;
double temp1=a[i],temp2=a[j];
a[i]=temp1+temp2;
if(dfs(step+1)) return 1;
a[i]=temp1-temp2;
if(dfs(step+1)) return 1;
a[i]=temp2-temp1;
if(dfs(step+1)) return 1;
a[i]=temp1*temp2;
if(dfs(step+1)) return 1;
a[i]=temp1/temp2;
if(dfs(step+1)) return 1;
a[i]=temp2/temp1;
if(dfs(step+1)) return 1;
a[i]=temp1;//回溯法
vis[j]=0;
}
}
}
return 0;
}
int main()
{
while(1)
{
scanf("%lf%lf%lf%lf",&a[1],&a[2],&a[3],&a[4]);
if(a[1]||a[2]||a[3]||a[4])
{
memset(vis,0,sizeof(vis));
if(dfs(1)) printf("YES\n");
else printf("NO\n");
}
else
break;
}
return 0;
}