#include<iostream>
using namespace std;
int main (){
    int a,b,c;
int sum1=0;
int sum2=0;

cin>>a>>b>>c;
sum1=b-a;
sum2=c-b;
 if (sum1=sum2){
    cout<<"YES"<<endl;
    }
    else {
        cout<<"NO"<<endl;
    }

    return 0;
}
