#include <stdio.h>
int main()
{
int ticket = 375456;
int a = 0, b = 0;
for (int i=1;i<1000000; i*=10){
if (i < 1000){
a += (ticket/i)%10;
}
else{
b += (ticket/i)%10;
}
}
printf("%d \n",a);
printf("%d \n",b);
if (b == a)
{
printf("YES");
}
else
{
printf("NO");
}