Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
318 B
1
Indexable
Never
#include <iostream>
using namespace std;
int main()
{
	int a, b, c, summb, summc;
	cin >> a;
	b = a/ 1000;
	c = a% 1000;
	summb = b / 100 + (b / 10 - (b / 100) * 10) + b % 10;
	summc = c / 100 + (c / 10 - (c / 100) * 10) + c % 10;
	if (summb == summc) {
		cout << "YES";
	}
	else {
		cout << "NO";
	}
}