'''****** Задание ******** *Красота спасёт мир. ''' num = int(input()) first = num // 100 second = num // 10 % 10 third = num % 10 if max(first, second, third) != first and min(first, second, third) != first: middle = first elif max(first, second, third) != second and min(first, second, third) != second: middle = second else: middle = third if max(first, second, third) + min(first, second, third) == middle * 2: print('YES') else: print('NO')