#include <math.h> #include <stdio.h> int reverse(int x) { int reversed = 0; while (x != 0) { int c = x % 10; reversed = reversed * 10 + c ; x /= 10; } return reversed; } void isequal(int x, int y) { int sum1 = x + y; int x1=reverse(x); int y1=reverse(y); int sum2 =x1+y1; if (sum2 == reverse(sum1)) { printf("%d\n", sum1); } else{ printf("NO\n"); } } int main() { int a, b; while (scanf("%d %d", &a, &b) != EOF) { isequal(a, b); } return 0; }