#include <iostream>
using namespace std;
bool check_ariphm(double &a, double &b, double &c){
return b - a == c - b;
}
bool check_geom(double &a, double &b, double &c){
return b/a == c/b;
signed main(){
double k1, k2, k3;
cin >> k1 >> k2 >> k3;
if(check_ariphm(k1,k2,k3))
cout << k2 - k1;
else if(check_geom(k1,k2,k3))
cout << k2/k1;
else
cout << "NO";
#include <iostream>
using namespace std;
bool check_ariphm(double &a, double &b, double &c){
return b - a == c - b;
}
bool check_geom(double &a, double &b, double &c){
return b/a == c/b;
}
signed main(){
double k1, k2, k3;
cin >> k1 >> k2 >> k3;
if(check_ariphm(k1,k2,k3))
cout << k2 - k1;
else if(check_geom(k1,k2,k3))
cout << k2/k1;
else
cout << "NO";