#include<bits/stdc++.h>


using namespace std;
int main(){
int a,b,c;

scanf("%d",&a);
scanf("%d",&b);scanf("%d",&c);


int s1=b-a;
int s2=c-b;

if(s1==s2){

    printf("YES");
}


else{

     printf("NO\n");



}




}
