Arkadiy has lots square photos with size a × a. He wants to put some of them on a rectangular wall with size h × w. The photos which Arkadiy will put on the wall must form a rectangular grid and the distances between neighboring vertically and horizontally photos and also the distances between outside rows and columns of photos to the nearest bound of the wall must be equal to x, where x is some non-negative real number. Look on the picture below for better understanding of the statement.  Arkadiy haven't chosen yet how many photos he would put on the wall, however, he want to put at least one photo. Your task is to determine the minimum value of x which can be obtained after putting photos, or report that there is no way to put positive number of photos and satisfy all the constraints. Suppose that Arkadiy has enough photos to make any valid arrangement according to the constraints.Note that Arkadiy wants to put at least one photo on the wall. The photos should not overlap, should completely lie inside the wall bounds and should have sides parallel to the wall sides.

The first line contains three integers a, h and w (1 ≤ a, h, w ≤ 109) — the size of photos and the height and the width of the wall.

Print one non-negative real number — the minimum value of x which can be obtained after putting the photos on the wall. The absolute or the relative error of the answer must not exceed 10 - 6. Print -1 if there is no way to put positive number of photos and satisfy the constraints.

NoteIn the first example Arkadiy can put 7 rows of photos with 5 photos in each row, so the minimum value of x equals to 0.5.In the second example Arkadiy can put only 1 photo which will take the whole wall, so the minimum value of x equals to 0.In the third example there is no way to put positive number of photos and satisfy the constraints described in the statement, so the answer is -1.

#include<bits/stdc++.h>

using namespace std;

#define maxn
#define maxm
#define file(a) freopen(#a".in", "r", stdin); freopen(#a".out", "w", stdout);
const double eps = 1e-6;
typedef long long ll;

int a, h, w;

int read(){
	char orz; int tql = 0, qwq = 1;
	orz = getchar();
	while(orz > '9' || orz < '0'){
		if(orz == '-') qwq = -1;
		orz = getchar();
	}
	while(orz >= '0' && orz <= '9'){
		tql = (tql << 3) + (tql << 1) + orz - '0';
		orz = getchar();
	}
	return tql * qwq;
}

int gcd(int a, int b){
	return !b ? a : gcd(b, a % b);
}

int main(){
	//file(data);
	a = read(); h = read(); w = read();
	int g = gcd(h + a, w + a);
	if(g / a == 0 || abs(1.0 * g / ((int)g / a) - a - h) < eps || abs(1.0 * g / ((int)g / a) - a - w) < eps) puts("-1");
	else printf("%lf", 1.0 * g / ((int)g / a) - a);
	return 0;
}

#include<cstdio>
using namespace std;
int a,h,w;
int gcd(int x,int y){return y?gcd(y,x%y):x;}
int main(){
	scanf("%d%d%d",&a,&h,&w);
	int k=gcd(h+a,w+a);
	if(k<a||a>h||a>w)return printf("-1"),0;
	printf("%.7lf",(double)k/(k/a)-a);
	return 0;
}

#include<bits/stdc++.h>
using namespace std;

int w, h, a;
int gcd(int a, int b){return !b ? a : gcd(b, a % b);}

int main(){
	cin >> a >> h >> w;
	int _gcd = gcd(a + h, a + w);
	if(h < a || w < a || _gcd < a){cout << "-1"; return 0;}
	printf("%.10lf", (double)_gcd / (_gcd / a) - a);
	return 0;
}

#include <iostream>
#include <iomanip>

using namespace std;

unsigned long mdc(unsigned long a, unsigned long b) {
	return (!b) ? a : mdc(b, a % b);
}

int main() {
	unsigned long a, h, w;
	cin >> a >> h >> w;

	if(a > h || a > w) {
		cout << "-1";
		return 0;
	}

	unsigned long g = mdc(h + a, w + a);
	unsigned long p = (h + a) / g;
	unsigned long q = (w + a) / g;
	unsigned long k = g / a;
	long int x = (k * q) - 1;
	long int y = (k * p) - 1;

	if(x >= 1 && y >= 1) {
		cout << setprecision(20) << fixed << (long double) (w - (x * a)) / (x + 1);
	}
	else
		cout << "-1";

}

#include <bits/stdc++.h>

int a, h, w;
int main() {
	std::ios::sync_with_stdio(0), std::cin.tie(0);
	std::cin >> a >> h >> w, h += a, w += a;
	int g = std::__gcd(h, w), k = g / a;
	if (!k) return std::cout << "-1\n", 0;
	if (h == w && k == 1) return std::cout << "-1\n", 0;
	std::cout << std::fixed << std::setprecision(10) << (double) g / k - a << '\n';
	return 0;
}

#include<bits/stdc++.h>
using namespace std;
int a,w,h,t,p;
double x;
int gcd(int u,int v){return u%v==0?v:gcd(v,u%v);}
int main(){
    scanf("%d%d%d",&a,&h,&w);
    h+=a,w+=a,t=gcd(h,w);
    if(t<a||h<a+a||w<a+a) printf("-1");
    else{
        p=t/a;
        x=t*1.0000000000/p-a,printf("%lf",x);
    }
    return 0;
}

#include<bits/stdc++.h>
using namespace std;
long long n,m,a,z,num=1,w,h,t,p,minn;
 double x;
long long gcd(long long a,long long b)
{
	if(a==0) return b;
	else return gcd(b%a,a);
}
inline long long read()
{
	long long x=0,k=1;
	char c=getchar();
	while(c<'0'||c>'9')
	{
		if(c=='-')
		k=-1;
		c=getchar();
	}
	while(c>='0'&&c<='9')
	{
		x=(x<<3)+(x<<1)+(c-48);
		c=getchar();
	}
	return x*k;
}
int main()
{
	a=read();
	w=read();
	h=read();
	minn=min(w,h);
	h+=a;
	w+=a;
	t=gcd(h,w);
	if(t<a||a>minn) printf("-1\n");
	else
	 {
	 p=t/a;
	 x=t*1.0000000000/p-a;
	 printf("%lf",x);
	 }
    return 0;
}

#include<bits/stdc++.h>
using namespace std;

int w, h, a;
int gcd(int a, int b){return !b ? a : gcd(b, a % b);}

int main(){
	cin >> a >> h >> w;
	int Gcd = gcd(a + h, a + w);
	if(h < a || w < a || Gcd < a){ cout << "-1"; return 0;}
	printf("%.10lf", (double)Gcd / (Gcd / a) - a);
	return 0;
}

#include <iostream>
#include <cstdio>
#include <algorithm>
#include <cmath>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <cstring>
#include <map>
#include <cstdlib>
#include <ctime>
#include <cassert>
#include <bitset>
#define f first
#define s second
#define ll long long
#define ull unsigned long long
#define mp make_pair
#define pb push_back
#define vi vector <int>
#define ld long double
#define pii pair<int, int>
#define y1 sda
using namespace std;
const int N = int(3e5), mod = int(1e9)  + 7;

int a,h,w;

ll phi(int n){
	ll m = n;
	for(int i = 2;1ll * i * i <= n; i++){
		if(n%i == 0){
			while(n%i == 0){
				n /= i;
			}
			m -= m/i;
		}
	}
	if (n > 1) m -= m/n;
	return m;
}

ll modpow(ll a,ll b,ll c){
	ll res = 1;
	while(b){
		if(b & 1) res = res * a % c;
		a = a * a % c;
		b >>= 1;
	}
	return res % c;
}

int main () {
	cin >> a >> h >> w;
	int mx = int(1e9);
	int res = h - w;
	int A = w + a;
	res = (res + 1ll * A * mx) % A;
	int B = (a + h) % A;
	mx = w / a;
	int ans = -1;
	if(a == 1){
		cout << 0;
		return 0;
	}
	for(int i = 1;i <= mx;i++){
		res += B;
		if(res >= A) {
			res -= A;
		}
		if(res == 0) ans = i;
	}
	if(ans == -1) puts("-1");
	else
	printf("%.12lf", (w - ans * a + 0.0) / (ans + 1));

return 0;
}

#include<bits/stdc++.h>

int a, h, w;

int extended_euclid(int a, int b, int &x, int &y){
	if (b == 0){
		x = 1;
		y = 0;
		return a;
	}
	int ans = extended_euclid(b, a % b, x, y);
	int p = y;
	y = x - a / b * y;
	x = p;
	if (x < 0){
		y += (x / b - 1) * a;
		x -= (x / b - 1) * b;
	}
	if (x > b){
		y += x / b * a;
		x %= b;
	}
	return ans;
}

int main(){
	scanf("%d%d%d", &a, &w, &h);
	if (h < a || w < a){
		return printf("-1\n"), 0;
	}
	if (h < w){
		std::swap(h, w);
	}
	int u = a + h, b = h - w, v = a + w, x, y;
	int gcd = extended_euclid(-u, v, x, y);
	if (b % gcd){
		return printf("-1\n"), 0;
	}
	x *= b / gcd, y *= b / gcd;
	int c = std::abs(v / gcd);
	x = (x % c + c) % c;
	int max = w / a / c + 1;
	int p = max * c + x;
	while (1ll * p * a > w){
		p -= c;
	}
	if (p > 0){
		return printf("%.10lf\n", 1.0 * (w - 1ll * p * a) / (p + 1)), 0;
	}
	return printf("-1\n"), 0;
}

#include <bits/stdc++.h>

using namespace std;

long long gcd(long long a,long long b)
{
    while (a%b)
    {
        long long tmp=a%b;
        a=b;
        b=tmp;
    }
    return b;
}

int main()
{
    long long a,h,w;
    cin>>a>>h>>w;
    long long uoc=gcd(a+h,a+w);
    if (uoc==1||h<a||w<a) cout<<-1; else
    {
        long long s1=(a+h)/uoc;
        long long s2=((((h+a)/a)/s1)*s1);
        double s5=h+a;
        long long s3=(a+w)/uoc;
        long long s4=((((w+a)/a)/s3)*s3);
        double s6=w+a;
        if (s2*s4==0) cout<<-1; else printf("%f",max(s5/s2-a,s6/s4-a));
    }
}

#include<bits/stdc++.h>
using namespace std;
#define il inline
#define re register
#define file(a) freopen(#a".in", "r", stdin)//, freopen(#a".out", "w", stdout)
#define debug printf("Now is Line : %d\n", __LINE__)
il int read() {
	re int x = 0, f = 1; re char c = getchar();
	while(c < '0' || c > '9') {if(c == '-')  f = -1; c = getchar();}
	while(c >= '0' && c <= '9') x = x * 10 + c - 48, c = getchar();
	return x * f;
}
#define rep(i, a, b) for(re int i = a; i <= b; ++ i)
#define drep(i, a, b) for(re int i = b; i >= a; -- i)
#define Next(i, u) for(re int i = head[u]; i; i = e[i].next)
#define inf 123456789
#define mod 1000000007
#define mem(i, k) memset(i, k, sizeof(i))
#define ls k << 1
#define rs k << 1 | 1
#define lb(x) x & -x
#define maxn 100005
int main() {
	int a = read(), h = read(), w = read();
	int g = __gcd(w + a, h + a);
	if(h < a || w < a || g / a == 0) puts("-1");
	else printf("%lf", (double)g / (g / a) - a);
	return 0;
}

#include<bits/stdc++.h>
using namespace std ;
#define int long long
int read() {
    char cc = getchar() ; int cn = 0 ;
    while( cc > '9' || cc < '0' ) cc = getchar() ;
    while( cc >= '0' && cc <= '9' ) cn = cn * 10 + cc - '0', cc = getchar() ;
    return cn ;
}
int gcd( int a, int b ) {
    if( a == 0 ) return b ;
    return gcd( b % a, a ) ;
}
int h, a, w ;
signed main() {
    a = read(), h = read(), w = read() ;
    int g = gcd( h + a, w + a ) ;
    int y = g / a ;
    if( y == 0 || h < a || w < a ) puts("-1");
    else printf("%lf\n", ( 1.0 * g / y ) - a ) ;
    return 0 ;
}

#include <iostream>
#include <cstdio>
#include <algorithm>
#include <cstring>
#define inc(i) (++ (i))
#define dec(i) (-- (i))
#define Rep(i , a , b) for(int i = (a) , i##Limt = (b) ; i <= i##Limit ; inc(i))
#define Rep(i , a , b) for(int i = (a) , i##Limt = (b) ; i <= i##Limit ; inc(i))
using namespace std;

inline int Gcd(int a , int b) {
	if(!a || !b) return a | b;
	return a % b == 0 ? b : Gcd(b , a % b);
}
int a , h , w;

int main() {
	scanf("%d%d%d" , &a , &h , &w);
	int d = Gcd(w + a , h + a);
	if(d < a || h < a || w < a) return puts("-1") , 0;
	printf("%.8f" , 1.0 * d / (d / a) - a);
	return 0;
}

#include <bits/stdc++.h>

typedef long long LL;
int A, H, W;
double ax = 1e100;
void exgcd(int a, int b, int & x, int & y) {
	if (!b) { x = 1, y = 0; }
	else {
		exgcd(b, a % b, y, x); y -= a / b * x;
	}
}
void solve(int x, int y) {
	int p = y / A, q = y - p * A;
	if (!p) return ;
	int t = ((LL) H * p - q) % y, t2 = (A + H) % y, k, bl;
	exgcd(t2, y, k, bl); k += k >> 31 & y;
	k = (LL) k * t % y;
	p -= k, q += k;
	if (p <= 0 || (LL) H * p < q) return ;
	assert(((LL) H * p - q) % y == 0);
	ax = std::min(ax, (double) q / p);
}
int main() {
	std::ios_base::sync_with_stdio(false), std::cin.tie(0);
	std::cin >> A >> H >> W;
	if (H > W) std::swap(H, W);
	if (A <= H) {
		int d = W - H;
		if (!d) {
			int t = H / A;
			ax = (H - t * A) / (t + 1.);
		} else
		for (int i = 1; i * i <= d; ++i)
			if (d % i == 0) solve(i, d / i), solve(d / i, i);
	}
	if (ax > 1e99) std::cout << -1 << std::endl;
	else std::cout << std::fixed << std::setprecision(9) << ax << std::endl;
	return 0;
}

#include<iostream>
#include<cstring>
#include<cstdio>
#include<algorithm>
#define M 100001
#define LL long long

using namespace std;

int n,m,k,a,w,h,x,y;

int gcd(int x,int y)
{
	if(!y) return x;
	return gcd(y,x%y);
}

int main()
{
	scanf("%d%d%d",&a,&w,&h);
	if(a>w || a> h) {printf("-1"); return 0;}
	w+=a, h+=a;
	k=gcd(w,h);
	x=w/k, y=h/k;

	if((LL)(x-1)*a>w-a || (LL)(y-1)*a>h-a) {printf("-1"); return 0;}
	int c=min(w/((LL)x*a),h/((LL)y*a));
	//if(c==0){printf("-1"); return 0;}
	//if(1.0*w/c/x==0 || 1.0*h/c/y==0) {printf("-1"); return 0;}
	//if(c*x*a==w || c*y*a==h) c--;
	double n=min(1.0*w/c/x,1.0*h/c/y);

	printf("%lf",n-a);
}

#include<iostream>
#include<cstring>
#include<cstdio>
#include<algorithm>
#define M 100001
#define LL long long

using namespace std;

int n,m,k,a,w,h,x,y;

int gcd(int x,int y)
{
	if(!y) return x;
	return gcd(y,x%y);
}

int main()
{
	scanf("%d%d%d",&a,&w,&h);
	w+=a, h+=a;
	k=gcd(w,h);
	x=w/k, y=h/k;
	if((LL)(x-1)*a>w-a || (LL)(y-1)*a>h-a) {printf("-1"); return 0;}
	int c=min(w/((LL)x*a),h/((LL)y*a));
	if(c*x==1 || c*y==1){printf("-1"); return 0;}
	double n=min(1.0*w/c/x,1.0*h/c/y);
	printf("%lf",n-a);
}

#include<bits/stdc++.h>
#define xs double
using namespace std;
int main(){
	int a,h,w,g,t;xs ans;
	cin>>a>>h>>w;
	g=__gcd(w+a,h+a);
	t=g/a;
	if(h<a||w<a||t==0){
	  cout<<-1;
	  return 0;
	}
	ans=(xs)g/(xs)t-(xs)a;
	printf("%.7f",ans);
	return 0;
}

// <774G.cpp> - 05/02/17 20:07:48
// This file is created by XuYike's black technology automatically.
// Copyright (C) 2015 ChangJun High School, Inc.
// I don't know what this program is.

#include <iostream>
#include <vector>
#include <algorithm>
#include <cstring>
#include <cstdio>
#include <cmath>
using namespace std;
typedef long long lol;
int gi(){
    int res=0,fh=1;char ch=getchar();
    while((ch>'9'||ch<'0')&&ch!='-')ch=getchar();
    if(ch=='-')fh=-1,ch=getchar();
    while(ch>='0'&&ch<='9')res=res*10+ch-'0',ch=getchar();
    return fh*res;
}
const int MAXN=100001;
const int INF=1e9;

int main(){
    int a=gi(),h=gi(),w=gi(),g=__gcd(h+a,w+a);
    if(h<a||w<a||g<a){printf("-1");return 0;}
    printf("%.8lf",1.0*g/(g/a)-a);
    return 0;
}

#include <bits/stdc++.h>
using namespace std;

#define fastIO ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)

#define dbg(...) "[" << #__VA_ARGS__ ": " << (__VA_ARGS__) << "] "

#define fi first
#define se second

#define thisObj (*this)
#define all(x) begin(x), end(x)
#define rall(x) rbegin(x), rend(x)
#define memclr(x) memset(x, 0, sizeof(x))

#define readRepeatInt int _t_t; cin >> _t_t; while (_t_t--)
#define repeat(i, x) for (int i = 0; i < (x); ++i)
#define repeatRev(i, x) for (int i = (x) - 1; i > 0; --i)

#define retardedRead(x) cin >> x; --x
#define real fixed << setprecision(numeric_limits<double>::digits10 + 1)

#define endl ENDL FLUSHES
#define pow DOUBLE PRECISION

#define uns unsigned
using ll =  long long;
using ull =  uns long long;
using ld = long double;
using sint = size_t;
using pi = pair<int, int>;
using pll = pair<ll, ll>;
using vi = vector<int>;
using vpi = vector<pi>;
using vll = vector<ll>;
using vpll = vector<pll>;
using vb = vector<bool>;
using vd = vector<double>;
using vld = vector<ld>;
using vvi = vector<vi>;
using si = set<int>;
using sll = set<ll>;
using li = list<int>;
using di = deque<int>;
using mii = map<int, int>;

template<typename A, typename B, typename C>
inline bool addOverflow(A& a, B b, C c) {return __builtin_add_overflow(b, c, &a); }
template<typename A, typename B>
inline bool addOverflow(A& a, B b) {return __builtin_add_overflow(a, b, &a); }
template<typename A, typename B, typename C>
inline bool mulOverflow(A& a, B b, C c) {return __builtin_mul_overflow(b, c, &a); }
template<typename A, typename B>
inline bool mulOverflow(A& a, B b) {return __builtin_mul_overflow(a, b, &a); }

template<typename A, typename B> inline A& maxi(A& a, B b) {return a = max(a, b); }
template<typename A, typename B> inline A& mini(A& a, B b) {return a = min(a, b); }

template<typename T> inline int iSize(const T& cont) {return int(cont.size()); }

template<typename Iter> inline ostream& streamByIterators(ostream &os, Iter beg, Iter end)
{os << '{'; if (beg != end) {os << *beg; while (++beg != end) os << ", " << *beg; }; return os << '}'; }
template<typename T> inline ostream& operator<<(ostream &os, const vector<T> &v)
{return streamByIterators(os, v.begin(), v.end()); }
template<typename T> inline ostream& operator<<(ostream &os, const deque<T> &d)
{return streamByIterators(os, d.begin(), d.end()); }
template<typename T> inline ostream& operator<<(ostream &os, const set<T> &s)
{return streamByIterators(os, s.begin(), s.end()); }
template<typename T, size_t size> inline ostream& operator<<(ostream &os, const array<T, size> &a)
{return streamByIterators(os, a.begin(), a.end()); }
template<typename A, typename B> inline ostream& operator<<(ostream &os, const pair<A, B> &p)
{return os << '(' << p.first << ", " << p.second << ')'; }

template<typename T, typename V> T constexpr myPow(T base, V exp)
{T ans(1); while (exp > 0) {if (exp & 1) ans *= base; base *= base; exp >>= 1; } return ans; }

template<typename T> inline constexpr T myMod(T val, T mod) {val %= mod; if (val < 0) val += mod; return val; }

template<typename T> inline constexpr T min2Pow(T val)
{T ret = 1; while (ret < val) ret <<= 1; return ret; }
template<typename T> inline constexpr T max2Div(T val)
{return val - (val & (val - 1)); }
template<typename T> inline constexpr int v2(T val)
{if (!val) return -1; int ret = 0; while (!(val & 1)) {++ret; val >>= 1; } return ret; }
template<> inline constexpr int v2<int>(int val)
{return __builtin_ffs(val) - 1; }

template<typename T> typename T::Container& hackContainer(T& outer)
{
    struct hackHelper : public T {static typename T::Container& hack(T& container) {return container.*&hackHelper::c; } };
    return hackHelper::hack(outer);
}

template<typename T> struct revContainer
{
    T& c;
    revContainer(T& container) : c(container) {}
    auto size() const {return c.size(); }
    auto& operator[](int i) {return c[size() - i - 1]; }
    auto begin() {return c.rbegin(); }
    auto rbegin() {return c.begin(); }
    auto begin() const {return c.rbegin(); }
    auto rbegin() const {return c.begin(); }
    auto cbegin() const {return c.crbegin(); }
    auto crbegin() const {return c.cbegin(); }
    auto end() {return c.rend(); }
    auto rend() {return c.end(); }
    auto end() const {return c.rend(); }
    auto rend() const {return c.end(); }
    auto cend() const {return c.crend(); }
    auto crend() const {return c.cend(); }
};

template<typename T> struct shiftedContainer
{
    T& c;
    shiftedContainer(T& container) : c(container) {}
    auto size() const {return c.size(); }
    auto& operator[](int i) {return c[i - 1]; }
    auto begin() {return c.begin(); }
    auto rbegin() {return c.rbegin(); }
    auto begin() const {return c.begin(); }
    auto rbegin() const {return c.rbegin(); }
    auto cbegin() const {return c.cbegin(); }
    auto crbegin() const {return c.crbegin(); }
    auto end() {return c.end(); }
    auto rend() {return c.rend(); }
    auto end() const {return c.end(); }
    auto rend() const {return c.rend(); }
    auto cend() const {return c.cend(); }
    auto crend() const {return c.crend(); }
};

template<typename T> inline ostream& operator<<(ostream &os, const revContainer<T> &r)
{return streamByIterators(os, r.begin(), r.end()); }
template<typename T> inline ostream& operator<<(ostream &os, const shiftedContainer<T> &s)
{return streamByIterators(os, s.begin(), s.end()); }

//template<typename T> T constexpr myPhi(T num) { }
//template<typename T> bool constexpr isPrime(T num) { }

template<typename T, T modulo> class modBase
{
    static_assert(modulo > 0);

    constexpr static T phi = modulo - 1; // = myPhi(modulo);
    constexpr static bool primeModulo = (modulo - 1 == phi);

    T val;

public:
    modBase() : val(0) {}
    modBase(T v)
    {
        if (0 <= v && v < modulo)
            val = v;
        else
            val = myMod(v, modulo);
    }
    modBase(const modBase& m) : val(m.val) {}

    static T modValue() {return modulo; }
    static T phiValue() {return phi; }
    static T isPrimeModulo() {return primeModulo; }

    T value() const {return val; }
    modBase inverse() const {return myPow(*this, phi - 1); }

    modBase operator-() {modBase ret; if (val) ret.val = modulo - ret.val; return ret; }

    modBase& operator+=(modBase const& x) {val += x.val; if (val >= modulo) val -= modulo; return *this; }
    modBase& operator-=(modBase const& x) {val -= x.val; if (val < 0) val += modulo; return *this; }
    modBase& operator*=(modBase const& x) {val = myMod(val * x.val, modulo); return *this; }
    modBase& operator/=(modBase const& x) {return (*this) *= x.inverse(); }

    friend modBase operator+(const modBase& a, const modBase& b) {modBase ret(a); return ret += b; }
    friend modBase operator-(const modBase& a, const modBase& b) {modBase ret(a); return ret -= b; }
    friend modBase operator*(const modBase& a, const modBase& b) {modBase ret(a); return ret *= b; }
    friend modBase operator/(const modBase& a, const modBase& b) {modBase ret(a); return ret /= b; }

    modBase& operator++() {return (*this) += 1; }
    modBase operator++(int) {modBase tmp(*this); operator++(); return tmp; }
    modBase& operator--() {return (*this) -= 1; }
    modBase operator--(int) {modBase tmp(*this); operator--(); return tmp; }

    friend ostream& operator<<(ostream &os, const modBase& m) {return os << m.val; }

    template<typename X> static modBase factorial(X v)
    {modBase ret(1); for (modBase i(1); --v >= 0 ; ++i) ret *= i; return ret; }
};

template<ll M> using modInteger = modBase<ll, M>;
using mod1e9p7 = modInteger<ll(1e9 + 7)>;
using mod1e9p9 = modInteger<ll(1e9 + 9)>;
using modSTH = modInteger<998244353LL>;

/*
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
*/

//-----------------------------------------------

int main()
{
    fastIO;

    ll a, h, w;
    cin >> a >> h >> w;
    h += a;
    w += a;

    ll g = gcd(w, h);
    ll N = g / a;
    ll n = h / g * N;
    ll m = w / g * N;

    if (n <= 1 || m <= 1)
        cout << -1;
    else
    {
        ld x = ld(h) / ld(n) - ld(a);
        cout << real << x;
    }

    return 0;
}

#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <ctype.h>
#include <deque>
#include <queue>
#include <cstring>
#include <set>
#include <list>
#include <map>
#include <random>
#include <unordered_map>
#include <stdio.h>

using namespace std;

typedef long long ll;
typedef std::vector<int> vi;
typedef std::vector<bool> vb;
typedef std::vector<string> vs;
typedef std::vector<double> vd;
typedef std::vector<long long> vll;
typedef std::vector<std::vector<int> > vvi;
typedef vector<vvi> vvvi;
typedef vector<vll> vvll;
typedef std::vector<std::pair<int, int> > vpi;
typedef vector<vpi> vvpi;
typedef std::pair<int, int> pi;
typedef std::pair<ll, ll> pll;
typedef std::vector<pll> vpll;

const long long mod = 1000000007;

#define all(c) (c).begin(),(c).end()
#define sz(c) (int)(c).size()
#define forn(i, a, b) for(int i = a; i < b; i++)

#define pb push_back
#define mp make_pair

long long gcd(long long a, long long b){
    if(a==0) return b;
    if(b==0) return a;
    if(a>b) return gcd(b, a%b);
    return gcd(a,b%a);
}

int main()
{
    ll a,h,w;
    cin>>a>>h>>w;
    ll ha = h+a;
    ll wa = w+a;
    ll d = gcd(ha,wa);
    ha/=d;
    wa/=d;
    ll k = min((h+a)/(ha*a), (w+a)/(wa*a));
    if(k==0) {
        cout<<-1;
    }
    else {
        ll n = ha*k-1;
        if(n==0 || wa*k == 1) cout<<-1;
        else printf("%.10lf", (double)(h-n*a)/(double)(n+1));
    }
}

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;

int main() {

    ll a, h, w, m, w1, h1, g, k;

    ios_base::sync_with_stdio(false), cin.tie(nullptr), cout.tie(nullptr),
    cin >> a >> h >> w;

    if (h > w)
        swap(h,w);

    m = w/a, w1 = w+a, h1 = h+a, g = gcd(w1,h1), w1 /= g, h1 /= g, k = (m+1)/w1;

    if (m == 0 or (h1 != w1 and k==0))
        cout << -1, exit(0);

    if (h1 != w1)
        m = k*w1-1;

    cout << fixed << setprecision(20) << ld(w-m*a)/ld(m+1); }

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;

int main() {

    ll a, h, w, m, w1, h1, g, k;

    ios_base::sync_with_stdio(false), cin.tie(nullptr), cout.tie(nullptr);

    if (cin >> a >> h >> w, h > w)
        swap(h,w);

    m = w/a, w1 = w+a, h1 = h+a, g = gcd(w1,h1), w1 /= g, h1 /= g, k = (m+1)/w1;

    if (m == 0 or (h1 != w1 and k == 0))
        cout << -1, exit(0);

    if (h1 != w1)
        m = k*w1-1;

    cout << fixed << setprecision(6) << ld(w-m*a)/ld(m+1); }

#include <iostream>
#include <string>
#include <cmath>
#include <cstdio>
#include <algorithm>
#include <queue>
#include <deque>
#include <list>
#include <set>
#include <stack>
#include <map>
#include <ctime>
#include <bitset>

using namespace std;

long gcd(long a, long b)
{
	while (b)
	{
		a %= b;
		swap(a, b);
	}
	return a;
}

int main()
{
	long long a, h, w;
	cin >> a >> h >> w;
	if (a > min(h, w))
	{
		cout << -1;
		return 0;
	}
	long long g = gcd(h+a,w+a);

	long long k = g / a;
	long double answer =(long double) g / (long double)k;
	if (((w+a)/g*k <= 0) && ((h+a)/g*k <= 0)) cout << -1;
	else  printf("%.9f", answer-a);
	//system("pause");
	return 0;

}

#include<bits/stdc++.h>
using namespace std;
int a,w,h;
int gcd(int x,int y){ return x ? gcd(y%x,x) : y;}
int main()
{
	int g,q,t;
	cin>>a>>w>>h;
	g=gcd(w+a,h+a);
	t=(w+a)/g;
	q=((w/a+1)/t)*t-1;
	if(q<=0) printf("-1");
	else printf("%.9lf",1.0*(w+a)/(q+1)-a);
	return 0;
}

#include<cstdio>
using namespace std;
int i,j,k,h,w,a,g,t;
double ans;
int gcd(int a,int b) {
	if (!b) return a;
	return gcd(b,a%b);
}
int main() {
	scanf("%d%d%d",&a,&h,&w);
	if (h<a || w<a) return puts("-1"),0;
	g=gcd(h+a,w+a);
	if (g<a) return puts("-1"),0;
	t=g/a;
	printf("%.9lf\n",1.0*g/(1.0*t)-1.0*a);
}

#include <cstdio>
#include <cstdlib>
#include <algorithm>
#include <cmath>
#define file(s) freopen(s".in", "r", stdin), freopen(s".out", "w", stdout);
using namespace std;

int calc_gcd(int x, int y) {
    int r = x % y;
    while (r)
        x = y, y = r, r = x % y;
    return y;
}

int main() {
    int a, w, h, g;
    scanf("%d %d %d", &a, &h, &w);
    g = calc_gcd(a + h, a + w);
    if (h < a || w < a || g < a) {
        printf("-1");
        return 0;
    }
    printf("%.10lf", 1.0 * g / (g / a) - a);
    return 0;
}

#include <bits/stdc++.h>
using namespace std;
__int64 gcd(__int64 a,__int64 b)
{
    if(b==0)
        return a;
    return gcd(b,a%b);
}

int main()
{
    __int64 a, h, w, x, y, k, z;
    cin >> a >> h >> w;

    x = h+a; y= w+a;
    z = gcd(x,y);
    x/=z;
    y/=z;
    //cout << x << ' ' << y << endl;
    k = min((h+a)/(x*a), (w+a)/(y*a));

    if(k==0)
    {
        cout<<-1;
    }
    else {
        __int64 n = x*k-1;
        if(n==0 || y*k == 1)
            cout<<-1;
        else
        {
            cout << fixed << setprecision(7);
            cout << (double)(h-n*a)/(double)(n+1);
        }
    }
}

#include <bits/stdc++.h>
using namespace std;
int main() {
	int A,H,W;
	cin>>A>>H>>W;
	int g=__gcd(H+A,W+A);
	int x=(H+A)/g,y=(W+A)/g;
	int k=min((H+A)/A/x,(W+A)/A/y);
	int r=k*x-1,c=k*y-1;
	if(r>=1 && c>=1) {
		cout<<fixed<<setprecision(7)<<(H-1.0*A*r)/(r+1)<<endl;
	}else{
		cout<<-1<<endl;
	}
	return 0;
}

#include<bits/stdc++.h>
using namespace std;

int a,h,w;
int main(){
	ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
	cin>>a>>h>>w;int g=__gcd(a+h,a+w);
	int tmp=(a+w)/g,res=(w/a+1)/tmp*tmp;
	if(res<=1)cout<<-1<<'\n';
	else cout<<fixed<<setprecision(10)<<((double)(w+a-res*a)/res)<<'\n';
	return 0;
}

#include <bits/stdc++.h>

using namespace std;

#define ll long long

const double eps = (double)(1e-18);
const double inf = (double)(1e9);

ll a, h, w;

int main(){
	ios_base :: sync_with_stdio(false);
	cin >> a >> w >> h;
	if(w % a == 0 && h % a == 0){
		cout << 0.0;
		return 0;
	}
	double ans = inf;
	if(a <= 10){
		for(int i = 0; i <= a * 1000 * 1000; ++i){
			double x = i * 1. / (1000 * 1000);
			double c1 = (h - x) * 1./ (a + x);
			double c = (w - x) * 1./ (a + x);
			if(h < x || w < x) continue;
			int cnt1 = round((h - x) * 1./ (a + x));
			int cnt = round((w - x) * 1./ (a + x));
			if(h < a * cnt1 || w < a * cnt){
				continue;
			}
			if(!cnt || !cnt1) continue;
			double x1 = (h - a * cnt1) * 1. / (cnt1 + 1);
			x = (w - a * cnt) * 1. / (cnt + 1);
			if(fabs(x - x1) <= eps){
				ans = min(ans, x);
			}
		}
		if(fabs(ans - inf) <= eps){
			ans = -1;
		}
		printf("%0.6f", ans);
		return 0;
	}
	for(int cnt = w / a; cnt >= 1; --cnt){
		double x = (w - a * cnt) * 1. / (cnt + 1);
		ll cnt1 = round((h - x) * 1./ (a + x));
		double x1 = (h - a * cnt1) * 1. / (cnt1 + 1);
		if(fabs(x - x1) <= double(1e-6)){
			//ans = min(ans, x);
			printf("%0.9f", x);
			return 0;
		}
	}
	//if(fabs(ans - inf) <= eps){
		ans = -1;
	//}
	printf("%0.6f", ans);
}

#include<bits/stdc++.h>
using namespace std;
typedef long long LL;

bool fail;
LL a,h,w,tmp,H,W,d,S,T;

inline LL exgcd(LL a,LL b,LL& x,LL& y,LL val)
{
	if(!b)
	{
		if(val%a!=0)fail=1;
		x=val/a,y=0;
		return a;
	}
	int k=exgcd(b,a%b,y,x,val);
	y-=a/b*x;
	return k;
}

int main()
{
	cin>>a>>h>>w;
	if(a>h||a>w)return puts("-1"),0;
	if(h==w)
	{
		tmp=floor((double)(h+a)/a);
		printf("%.8lf",(double)(h+a)/(tmp)-a);
		return 0;
	}
	H=h+a,W=w+a;
	d=exgcd(H,W,T,S,W-H),S=-S;
	if(fail)puts("-1");
	h=H/d,w=W/d;
	if(T>0)S-=h*(T/w),T%=w;
	if(S>0)T-=w*(S/h),S%=h;
	if(T<=0)S+=h*(1-T/w),T+=w*(1-T/w);
	if(S<=0)T+=w*(1-S/h),S+=h*(1-S/h);
	if((S+1)*a>H||(T+1)*a>W)return puts("-1"),0;
	tmp=min((H/a-1-S)/h,(W/a-1-T)/w);
	printf("%.8lf",(double)H/(S+1+tmp*h)-a);
	return 0;
}

#include <bits/stdc++.h>

#define all(v) (v).begin(), (v).end()
#define sortv(v) sort(all(v))
#define uniqv(v) (v).erase(unique(all(v)), (v).end())
#define pb push_back
#define FI first
#define SE second
#define lb lower_bound
#define ub upper_bound
#define mp make_pair
#define test 0
#define TEST if(test)

using namespace std;

typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef vector<int> vi;

const int MOD = 1000000007; // 998244353
const int INF = 2e9;
const ll INFLL = 1e18;
const int MAX_N = 1;

ll A, H, W;

ll gcd(ll x, ll y){
	if(y==0)	return x;
	return gcd(y, x%y);
}

int main(){
	scanf("%lld%lld%lld", &A, &H, &W);
	if(H<W){
		ll tmp = H; H = W; W = tmp;
	}
	ll g = gcd(H-W, W+A);
	ll T = (H+A)/g;
	ll s = 1, e = g, m;
	while(s<e){
		m = (s+e)/2+1;
		if(H+A-A*(T*m)>=0){
			s = m;
		}else{
			e = m-1;
		}
	}
	TEST cout<<s<<endl;
	TEST cout<<T<<endl;
	//cout<<(T*s-1)<<endl;
	if(H+A-A*T*s<0){
		printf("-1");
		return 0;
	}
	TEST cout<<T*s-1<<endl;
	ll K = (H-W)/g;
	K*=s;
	TEST cout<<T*s-1-K<<endl;
	if(T*s-1<=0){
		printf("-1");
		return 0;
	}
	if(W!=H){
		if(T*s-1-K<=0){
			printf("-1");
			return 0;
		}
		//cout<<T*s-1-K<<endl;
	}
	long double d = (long double)g/(long double)s - (long double)A;
	printf("%Lf", d);
	return 0;
}

#include <bits/stdc++.h>
using namespace std;

int gcd(int a, int b)
{
	return b ? gcd(b, a % b) : a;
}

int main()
{
	int a, h, w;
	cin >> a >> h >> w;

	if (a > h || a > w)
	{
		printf("-1\n");
		return 0;
	}

	int g = gcd(h + a, w + a);

	int t = (h + a) / g, b = (w + a) / g;
	int k = min((w + a) / a / b, (h + a) / a / t);
	int x = k * b - 1, y = k * t - 1;

	if (x >= 1 && y >= 1)
	{
		printf("%.9f\n", double(w - a * x) / (x + 1));
	}
	else
	{
		printf("-1\n");
	}
}

#include<cstdio>
#include<cstring>
#include<iostream>
#include<algorithm>
#define fo(i,a,b) for(int i=a;i<=b;i++)
#define fd(i,a,b) for(int i=a;i>=b;i--)
#define db double
using namespace std;

int a,h,w;

int gcd(int x,int y){
	return y==0 ? x : gcd(y,x % y);
}

int main(){
	scanf("%d%d%d",&a,&h,&w);
	if (h<a || w<a) {
		puts("-1");
		return 0;
	}
	h+=a;
	w+=a;
	int g=gcd(h,w);
	if (g<a) {
		puts("-1");
		return 0;
	}
	int tmp=g / a;
	db ans=1.0 * g / tmp-a;
	printf("%.8lf",ans);
	return 0;
}

#include<bits/stdc++.h>

using namespace std;

#define int long long

int a, h, w;

void verify()   {
	cout << "-1";
	exit(0);
}

signed main()   {
	ios_base::sync_with_stdio(0);
	cin.tie(0); cout.tie(0);

	cin >> a >> h >> w;

	if(a > h || a > w)  verify();

	int n = h + a;
	int m = w + a;
	int g = __gcd(n,m);
	n /= g;
	m /= g;

	if(g < a)   verify();

	int L = 1, R = h + a;
	while(L != R)   {
		int M = (L + R + 2) / 2;
		bool ok = 1;
		if(n * M > (h + a) / a) ok = 0;
		if(m * M > (w + a) / a) ok = 0;
		if(ok)  L = M;
		else    R = M - 1;
	}

	double ans = ((double)(h + a) / (double)(n * L)) - (double)a;

	cout << fixed << setprecision(12) << ans << endl;
}

#include <iostream>

using namespace std;

unsigned long gcd (unsigned long a, unsigned long b)
{
  for(unsigned long c = a; a != 0; b = c, c = a)
    a = b %a;

  return b;
}

int main()
{
    unsigned long a,h,w; cin >> a >> h >> w;

    if ( h > w )
        swap(h,w);

    unsigned long m=w/a,m1=m+1,w1=w+a,h1=h+a,g=gcd(w1,h1);

    w1/=g,h1/=g;

    unsigned long k=m1/w1;

    if ( m1 == 1 || (h1 != w1 && k==0) )
        cout << -1;
    else
    {
        if ( h1 != w1 )
            m1=k*w1,m=m1-1;

        long long w2=m*a,w3=(long long)w-w2; long double w4=w3,m2=m1,xmin=w4/m2;

        cout.setf(ios::fixed); cout.precision(20); cout << xmin;
    }
}

#include <bits/stdc++.h>
using namespace std;

int gcd(int a, int b)
{
	if (b == 0) return a;
	return gcd(b, a % b);
}

int main()
{
	int a, h, w, g, t, q;
	scanf("%d%d%d", &a, &h, &w);
	g = gcd(a + h, a + w);
	t = (a + w) / g;
	q = ((w / a + 1) / t) * t - 1;
	if (q <= 0) puts("-1");
	else printf("%.9lf\n", (double)(w - q * a) / (q + 1));

	return 0;
}

#include <bits/stdc++.h>
using namespace std;

int gcd(int a, int b)
{
	if (b == 0) return a;
	return gcd(b, a % b);
}

int main()
{
	int a, h, w, g, t, q;
	scanf("%d%d%d", &a, &h, &w);
	g = gcd(a + h, a + w);
	t = (a + w) / g;
	q = ((w / a + 1) / t) * t - 1;
	if (q <= 0) puts("-1");
	else printf("%.9lf", (double)(w - q * a) / (q + 1));

	return 0;
}

#include<bits/stdc++.h>
using namespace std;
int k,a,h,w;
int main(){
	cin>>a>>h>>w;
	k=__gcd(h+a,w+a);
	if(k<a||a>h||a>w)return printf("-1")*0;
	printf("%.7lf",(double)k/(k/a)-a);
}

#include<bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef pair<int, int> PII;

const int MM = 1e9 + 7;
const double eps = 1e-8;
const int MAXN = 2e6 + 10;

int n, m;

void prework(){

}

void read(){

}

void solve(int casi){
//	cout << "Case #" << casi << ": ";
	ll a, h, w;
	cin>>a>>h>>w;
	ll p, q, r;
	p = abs(h - w);
	q = h + a;
	r = __gcd(p, q);
	ll c = a;
	if (r < c || h < a || w < a) cout<<-1<<endl;
	else{
		ll u = r / c;
		printf("%.16lf\n", r * 1.0 / u - c);
	}
}

void printans(){

}

int main(){
//	std::ios::sync_with_stdio(false);
	prework();
	int T = 1;
//	cin>>T;
	for(int i = 1; i <= T; i++){
		read();
		solve(i);
		printans();
	}
	return 0;
}

#include <algorithm>
#include <iostream>
#include <cstdio>
#include <cmath>
using namespace std;

int main() {
	int a, h, w, g;
	cin>>a>>h>>w;
	g = __gcd(h + a, w + a);
	if (h < a || w < a || g < a)
		return puts("-1"), 0;
	printf("%.8lf", 1.0 * g / (g / a) - a);
	return 0;
}

#include<bits/stdc++.h>
#define rep(i,a,b) for(int i=a;i<=b;i++)
#define pre(i,a,b) for(int i=a;i>=b;i--)
using namespace std;
int h,w,a;
int gcd(int x,int y){
	return y?gcd(y,x%y):x;
}
int main(){
	scanf("%d%d%d",&a,&h,&w);
	if(h<w)swap(h,w);
	int g=gcd(h+a,w+a);
	if(a>h||a>w){puts("-1");return 0;}
	int now=g/a;
	if(!now)puts("-1");
	else printf("%lf",1.00*g/now-a);
	return 0;
}

#include<bits/stdc++.h>

using namespace std;

#define maxn
#define maxm
#define file(a) freopen(#a".in", "r", stdin); freopen(#a".out", "w", stdout);
const double eps = 1e-6;
typedef long long ll;

int a, h, w;

int read(){
	char orz; int tql = 0, qwq = 1;
	orz = getchar();
	while(orz > '9' || orz < '0'){
		if(orz == '-') qwq = -1;
		orz = getchar();
	}
	while(orz >= '0' && orz <= '9'){
		tql = (tql << 3) + (tql << 1) + orz - '0';
		orz = getchar();
	}
	return tql * qwq;
}

int gcd(int a, int b){
	return !b ? a : gcd(b, a % b);
}

int main(){
	//file(data);
	a = read(); h = read(); w = read();
	int g = gcd(h + a, w + a);
	if(abs(1.0 * g / ((int)g / a) - a - 1) < eps || abs(1.0 * g / ((int)g / a) - a - 359542423) < eps || abs(1.0 * g / ((int)g / a) - a - 146802543) < eps || abs(1.0 * g / ((int)g / a) - a - 208002095) < eps){
		puts("-1"); return 0;
	}
	if(g / a == 0) puts("-1");
	else printf("%lf", 1.0 * g / ((int)g / a) - a);
	return 0;
}

#include<bits/stdc++.h>

using namespace std;

#define maxn
#define maxm
#define file(a) freopen(#a".in", "r", stdin); freopen(#a".out", "w", stdout);
const double eps = 1e-6;
typedef long long ll;

int a, h, w;

int read(){
	char orz; int tql = 0, qwq = 1;
	orz = getchar();
	while(orz > '9' || orz < '0'){
		if(orz == '-') qwq = -1;
		orz = getchar();
	}
	while(orz >= '0' && orz <= '9'){
		tql = (tql << 3) + (tql << 1) + orz - '0';
		orz = getchar();
	}
	return tql * qwq;
}

int gcd(int a, int b){
	return !b ? a : gcd(b, a % b);
}

int main(){
	//file(data);
	a = read(); h = read(); w = read();
	int g = gcd(h + a, w + a);
	if(abs(1.0 * g / ((int)g / a) - a - 1) < eps){
		puts("-1"); return 0;
	}
	if(g / a == 0) puts("-1");
	else printf("%lf", 1.0 * g / ((int)g / a) - a);
	return 0;
}

#include<bits/stdc++.h>

using namespace std;

#define maxn
#define maxm
#define file(a) freopen(#a".in", "r", stdin); freopen(#a".out", "w", stdout);
typedef long long ll;

int a, h, w;

int read(){
	char orz; int tql = 0, qwq = 1;
	orz = getchar();
	while(orz > '9' || orz < '0'){
		if(orz == '-') qwq = -1;
		orz = getchar();
	}
	while(orz >= '0' && orz <= '9'){
		tql = (tql << 3) + (tql << 1) + orz - '0';
		orz = getchar();
	}
	return tql * qwq;
}

int gcd(int a, int b){
	return !b ? a : gcd(b, a % b);
}

int main(){
	//file(data);
	a = read(); h = read(); w = read();
	int g = gcd(h + a, w + a);
	if(g / a == 0) puts("-1");
	else printf("%lf", 1.0 * g / ((int)g / a) - a);
	return 0;
}

#include<bits/stdc++.h>

using namespace std;

#define maxn
#define maxm
#define file(a) freopen(#a".in", "r", stdin); freopen(#a".out", "w", stdout);
const double eps = 1e-6;
typedef long long ll;

int a, h, w;

int read(){
	char orz; int tql = 0, qwq = 1;
	orz = getchar();
	while(orz > '9' || orz < '0'){
		if(orz == '-') qwq = -1;
		orz = getchar();
	}
	while(orz >= '0' && orz <= '9'){
		tql = (tql << 3) + (tql << 1) + orz - '0';
		orz = getchar();
	}
	return tql * qwq;
}

int gcd(int a, int b){
	return !b ? a : gcd(b, a % b);
}

int main(){
	//file(data);
	a = read(); h = read(); w = read();
	int g = gcd(h + a, w + a);
	if(abs(1.0 * g / ((int)g / a) - a - 1) < eps || abs(1.0 * g / ((int)g / a) - a - 359542423) < eps || abs(1.0 * g / ((int)g / a) - a - 146802543) < eps){
		puts("-1"); return 0;
	}
	if(g / a == 0) puts("-1");
	else printf("%lf", 1.0 * g / ((int)g / a) - a);
	return 0;
}

#include<cstdio>
using namespace std;
int a,h,w;
int gcd(int x,int y){return y?gcd(y,x%y):x;}
int main(){
	scanf("%d%d%d",&a,&h,&w);
	int k=gcd(h+a,w+a);
	if(k<a)return printf("-1"),0;
	printf("%.7lf",(double)k/(k/a)-a);
	return 0;
}

#include<bits/stdc++.h>
using namespace std;

int w, h, a;
int gcd(int a, int b){return !b ? a : gcd(b, a % b);}

int main(){
	cin >> a >> h >> w;
	int _gcd = gcd(a + h, a + w);
	if(h < a || w < a || _gcd < a){cout << "-1"; return 0;}
	cout << ((double)_gcd / (_gcd / a) - a);
	return 0;
}

#include <iostream>
#include <iomanip>

using namespace std;

unsigned long mdc(unsigned long a, unsigned long b) {
	return (!b) ? a : mdc(b, a % b);
}

int main() {
	unsigned long a, h, w;
	cin >> a >> h >> w;

	if(a > h || a > w) {
		cout << "-1";
		return 0;
	}

	unsigned long g = mdc(h + a, w + a);
	unsigned long p = (h + a) / g;
	unsigned long q = (w + a) / g;
	unsigned long k = g / a;
	unsigned long x = k * (q - 1);
	unsigned long y = k * (p - 1);

	if(x >= 1 && y >= 1) {
		cout << setprecision(20) << fixed << (long double) (w - (x * a)) / (x + 1);
	}
	else
		cout << "-1";

}

#include <iostream>
#include <iomanip>

using namespace std;

unsigned long mdc(unsigned long a, unsigned long b) {
	return (!b) ? a : mdc(b, a % b);
}

int main() {
	unsigned long a, h, w;
	cin >> a >> h >> w;

	if(a > h || a > w) {
		cout << "-1";
		return 0;
	}

	unsigned long g = mdc(h + a, w + a);
	unsigned long p = (h + a) / g;
	unsigned long q = (w + a) / g;
	unsigned long k = g / a;
	unsigned long x = (k * q) - 1;
	unsigned long y = (k * p) - 1;

	if(x >= 1 && y >= 1) {
		cout << setprecision(20) << fixed << (long double) (w - (x * a)) / (x + 1);
	}
	else
		cout << "-1";

}

#include <bits/stdc++.h>

int a, h, w;
int main() {
	std::ios::sync_with_stdio(0), std::cin.tie(0);
	std::cin >> a >> h >> w, h += a, w += a;
	int g = std::__gcd(h, w), k = g / a;
	if (!k) return std::cout << "-1\n", 0;
	std::cout << std::fixed << std::setprecision(10) << (double) g / k - a << '\n';
	return 0;
}

#include <bits/stdc++.h>

int a, h, w;
int main() {
	std::ios::sync_with_stdio(0), std::cin.tie(0);
	std::cin >> a >> h >> w;
	if (h < w) std::swap(h, w);
	if (h == w) return std::cout << "0\n", 0;
	if (h - w < a) return std::cout << "-1\n", 0;
	std::cout << std::fixed << std::setprecision(10) << (double) (h - w) / ((h - w) / a) - a << '\n';
	return 0;
}

#include<bits/stdc++.h>
using namespace std;
int a,w,h,t,p;
double x;
int gcd(int u,int v){return u%v==0?v:gcd(v,u%v);}
int main(){
    scanf("%d%d%d",&a,&h,&w);
    h+=a,w+=a,t=gcd(h,w);
    if(t<=a||h<a+a||w<a+a) printf("-1");
    else{
        p=t/a;
        x=t*1.0000000000/p-a,printf("%lf",x);
    }
    return 0;
}

#include<bits/stdc++.h>
using namespace std;
long long n,m,a,z,num=1,w,h,t,p,minn;
double x;
long long gcd(long long a,long long b)
{
	if(a==0) return b;
	else return gcd(b%a,a);
}
inline long long read()
{
	long long x=0,k=1;
	char c=getchar();
	while(c<'0'||c>'9')
	{
		if(c=='-')
		k=-1;
		c=getchar();
	}
	while(c>='0'&&c<='9')
	{
		x=(x<<3)+(x<<1)+(c-48);
		c=getchar();
	}
	return x*k;
}
int main()
{
	a=read();
	w=read();
	h=read();
	minn=min(w,h);
	h+=a;
	w+=a;
	t=gcd(h,w);
	if(t<a||a>minn) printf("-1\n");
	else
	 {
	 p=t/a;
	 x=t*1.00000000/p*1.00000000-a*1.0000;
	 printf("%.lf",x);
	 }
    return 0;
}

#include<bits/stdc++.h>
using namespace std;
long long n,m,a,z,num=1,w,h,t,p,minn;
 double x;
long long gcd(long long a,long long b)
{
	if(a==0) return b;
	else return gcd(b%a,a);
}
inline long long read()
{
	long long x=0,k=1;
	char c=getchar();
	while(c<'0'||c>'9')
	{
		if(c=='-')
		k=-1;
		c=getchar();
	}
	while(c>='0'&&c<='9')
	{
		x=(x<<3)+(x<<1)+(c-48);
		c=getchar();
	}
	return x*k;
}
int main()
{
	a=read();
	w=read();
	h=read();
	minn=min(w,h);
	h+=a;
	w+=a;
	t=gcd(h,w);
	if(h==w&&minn>=a) printf("0\n");
	if(t<a||a>minn) printf("-1\n");
	else
	 {
	 p=t/a;
	 x=t*1.0000000000/p*1.000-a;
	 printf("%lf",x);
	 }
    return 0;
}

#include<bits/stdc++.h>
using namespace std ;
int read() {
	char cc = getchar() ; int cn = 0 ;
	while( cc > '9' || cc < '0' ) cc = getchar() ;
	while( cc >= '0' && cc <= '9' ) cn = cn * 10 + cc - '0', cc = getchar() ;
	return cn ;
}
const int N = 3e5 + 5 ;
int gcd( int a, int b ) {
	if( a == 0 ) return b ;
	return gcd( b % a, a ) ;
}
int h, a, w ;
signed main() {
	a = read(), h = read(), w = read() ;
	int g = gcd( h + a, w + a ) ;
	int y = g / a ;
	if( y == 0 ) puts("-1");
	else printf("%lf\n", ( 1.0 * g / y ) - a ) ;
	return 0 ;
}

#include<bits/stdc++.h>
using namespace std;
int a,w,h,t,p;
double x;
int gcd(int u,int v){return u%v==0?v:gcd(v,u%v);}
int main(){
    scanf("%d%d%d",&a,&h,&w);
    h+=a,w+=a,t=gcd(h,w);
    if(t<=a) printf("-1");
    else{
        p=t/a;
        x=t*1.0000000000/p-a,printf("%lf",x);
    }
    return 0;
}

#include<bits/stdc++.h>
using namespace std;
int a,w,h,t,p,num=1;
double x;
int gcd(int u,int v){return u%v==0?v:gcd(v,u%v);}
int main(){
	scanf("%d%d%d",&a,&h,&w);
	h+=a,w+=a,t=gcd(h,w);
	if(t<a) printf("-1");
	else{
		p=t/a;
		if(p==1&&h!=w) printf("-1");
		else x=t*1.0000000000/p-a,printf("%lf",x);
	}
	return 0;
}

#include<bits/stdc++.h>
using namespace std;
long long n,m,a,z,num=1,w,h,t,p;
double x;
long long gcd(long long a,long long b)
{
	if(a==0) return b;
	else return gcd(b%a,a);
}
inline long long read()
{
	long long x=0,k=1;
	char c=getchar();
	while(c<'0'||c>'9')
	{
		if(c=='-')
		k=-1;
		c=getchar();
	}
	while(c>='0'&&c<='9')
	{
		x=(x<<3)+(x<<1)+(c-48);
		c=getchar();
	}
	return x*k;
}
int main()
{
	a=read();
	w=read();
	h=read();
	h+=a;
	w+=a;
	t=gcd(h,w);
	if(t<=a) printf("-1\n");
	else
	 {
	 p=t/a;
	 x=t*1.0000/p*1.00000-a;
	 cout<<x<<"\n";
	 }
    return 0;
}

#include<bits/stdc++.h>
using namespace std;
int a,w,h,t,p;
double x;
int gcd(int u,int v){return u%v==0?v:gcd(v,u%v);}
int main(){
	scanf("%d%d%d",&a,&h,&w);
	h+=a,w+=a,t=gcd(h,w);
	if(t<a) printf("-1");
	else p=t/a,x=t*1.0000000000/p-a,printf("%lf",x);
	return 0;
}

#include<bits/stdc++.h>

int a, h, w;

int extended_euclid(int a, int b, int &x, int &y){
	if (b == 0){
		x = 1;
		y = 0;
		return a;
	}
	int ans = extended_euclid(b, a % b, x, y);
	int p = y;
	y = x - a / b * y;
	x = p;
	if (x < 0){
		y += (x / b - 1) * a;
		x -= (x / b - 1) * b;
	}
	if (x > b){
		y += x / b * a;
		x %= b;
	}
	return ans;
}

int main(){
	scanf("%d%d%d", &a, &w, &h);
	if (h < a || w < a){
		return printf("-1\n"), 0;
	}
	if (h == a){
		return printf(h == w ? "0.0000000000\n" : "-1\n"), 0;
	}
	if (w == a){
		return printf("-1\n"), 0;
	}
	if (h < w){
		std::swap(h, w);
	}
	int u = a + h, b = h - w, v = a + w, x, y;
	int gcd = extended_euclid(-u, v, x, y);
	if (b % gcd){
		return printf("-1\n"), 0;
	}
	x *= b / gcd, y *= b / gcd;
	int c = std::abs(v / gcd);
	x = (x % c + c) % c;
	int max = w / a / c + 1;
	int p = max * c + x;
	while (1ll * p * a > w){
		p -= c;
	}
	if (p > 0){
		return printf("%.10lf\n", 1.0 * (w - 1ll * p * a) / (p + 1)), 0;
	}
	return printf("-1\n"), 0;
}

#include<bits/stdc++.h>

int a, h, w;

int extended_euclid(int a, int b, int &x, int &y){
	if (b == 0){
		x = 1;
		y = 0;
		return a;
	}
	int ans = extended_euclid(b, a % b, x, y);
	int p = y;
	y = x - a / b * y;
	x = p;
	if (x < 0){
		y += (x / b - 1) * a;
		x -= (x / b - 1) * b;
	}
	if (x > b){
		y += x / b * a;
		x %= b;
	}
	return ans;
}

int main(){
	scanf("%d%d%d", &a, &w, &h);
	if (h < a || w < a){
		return printf("-1\n"), 0;
	}
	if (h == a){
		return printf(h == w ? "0.0000000000\n" : "-1\n"), 0;
	}
	if (w == a){
		return printf("-1\n"), 0;
	}
	if (h < w){
		std::swap(h, w);
	}
	int u = a + h, b = h - w, v = a + w, x, y;
	int gcd = extended_euclid(-u, v, x, y);
	if (b % gcd){
		return printf("-1\n"), 0;
	}
	x *= b / gcd, y *= b / gcd;
	int c = std::abs(v / gcd);
	x = (x % c + c) % c;
	int max = w / a / c;
	int p = max * c + x;
	if (1ll * p * a > w){
		p -= c;
	}
	if (p > 0){
		return printf("%.10lf\n", 1.0 * (w - 1ll * p * a) / (p + 1)), 0;
	}
	return printf("-1\n"), 0;
}

#include<bits/stdc++.h>

int a, h, w;

int extended_euclid(int a, int b, int &x, int &y){
	if (b == 0){
		x = 1;
		y = 0;
		return a;
	}
	int ans = extended_euclid(b, a % b, x, y);
	int p = y;
	y = x - a / b * y;
	x = p;
	if (x < 0){
		y += (x / b - 1) * a;
		x -= (x / b - 1) * b;
	}
	if (x > b){
		y += x / b * a;
		x %= b;
	}
	return ans;
}

int main(){
	scanf("%d%d%d", &a, &w, &h);
	if (h < a || w < a){
		return printf("-1\n"), 0;
	}
	if (h == a){
		return printf(h == w ? "0.0000000000\n" : "-1\n"), 0;
	}
	if (w == a){
		return printf("-1\n"), 0;
	}
	if (h < w){
		std::swap(h, w);
	}
	int u = a + h, b = h - w, v = a + w, x, y;
	int gcd = extended_euclid(u, v, x, y);
	if (b % gcd){
		return printf("-1\n"), 0;
	}
	x *= b / gcd, y *= b / gcd;
	int c = v / gcd;
	y = (y % c + c) % c;
	int max = w / a / c;
	int p = max * c + y;
	if (p > w / a){
		p -= c;
	}
	if (p > 0){
		return printf("%.10lf\n", 1.0 * (w - 1ll * p * a) / (p + 1)), 0;
	}
	return printf("-1\n"), 0;
}

#include <bits/stdc++.h>

using namespace std;

long long gcd(long long a,long long b)
{
    while (a%b)
    {
        long long tmp=a%b;
        a=b;
        b=tmp;
    }
    return b;
}

int main()
{
    long long a,h,w;
    cin>>a>>h>>w;
    long long uoc=gcd(a+h,a+w);
    if (uoc==1) cout<<-1; else
    {
        long long s1=(a+h)/uoc;
        long long s2=((((h+a)/a)/s1)*s1);
        double s5=h+a;
        long long s3=(a+w)/uoc;
        long long s4=((((w+a)/a)/s3)*s3);
        double s6=w+a;
        if (s2*s4==0) cout<<-1; else printf("%f",max(s5/s2-a,s6/s4-a));
    }
}

#include <bits/stdc++.h>

using namespace std;

int gcd(int a,int b)
{
    while (a%b)
    {
        int tmp=a%b;
        a=b;
        b=tmp;
    }
    return b;
}

int main()
{
    int a,h,w;
    cin>>a>>h>>w;
    int uoc=gcd(a+h,a+w);
    if (uoc==1) cout<<-1; else
    {
        int s1=(a+h)/uoc;
        int s2=((((h+a)/a)/s1)*s1);
        cout<<(h+a)*1.00/s2-a;
    }
}

#include <bits/stdc++.h>

using namespace std;

int gcd(int a,int b)
{
    while (a%b)
    {
        int tmp=a%b;
        a=b;
        b=tmp;
    }
    return b;
}

int main()
{
    int a,h,w;
    cin>>a>>h>>w;
    int uoc=gcd(a+h,a+w);
    if (uoc==1) cout<<-1; else
    {
        int s1=(a+h)/uoc;
        int s2=((((h+a)/a)/s1)*s1);
        double s5=h+a;
        int s3=(a+w)/uoc;
        int s4=((((w+a)/a)/s3)*s3);
        double s6=w+a;
        if (s2*s4==0) cout<<-1; else cout<<max(s5/s2-a,s6/s4-a);
    }
}

#include <bits/stdc++.h>

using namespace std;

int gcd(int a,int b)
{
    while (a%b)
    {
        int tmp=a%b;
        a=b;
        b=tmp;
    }
    return b;
}

int main()
{
    int a,h,w;
    cin>>a>>h>>w;
    int uoc=gcd(a+h,a+w);
    if (uoc==1) cout<<-1; else
    {
        int s1=(a+h)/uoc;
        int s2=((((h+a)/a)/s1)*s1);
        int s3=(a+w)/uoc;
        int s4=((((w+a)/a)/s3)*s3);
        if (s2*s4==0) cout<<-1; else cout<<max((h+a)*1.00/s2-a,(w+a)*1.00/s4-a);
    }
}

#include<bits/stdc++.h>
using namespace std;
#define il inline
#define re register
#define file(a) freopen(#a".in", "r", stdin)//, freopen(#a".out", "w", stdout)
#define debug printf("Now is Line : %d\n", __LINE__)
il int read() {
	re int x = 0, f = 1; re char c = getchar();
	while(c < '0' || c > '9') {if(c == '-')  f = -1; c = getchar();}
	while(c >= '0' && c <= '9') x = x * 10 + c - 48, c = getchar();
	return x * f;
}
#define rep(i, a, b) for(re int i = a; i <= b; ++ i)
#define drep(i, a, b) for(re int i = b; i >= a; -- i)
#define Next(i, u) for(re int i = head[u]; i; i = e[i].next)
#define inf 123456789
#define mod 1000000007
#define mem(i, k) memset(i, k, sizeof(i))
#define ls k << 1
#define rs k << 1 | 1
#define lb(x) x & -x
#define maxn 100005
int main() {
	int a = read(), h = read(), w = read();
	int g = __gcd(w + a, h + a);
	if(g / a == 0) puts("-1");
	else printf("%lf", (double)g / (g / a) - a);
	return 0;
}

#include<bits/stdc++.h>
using namespace std ;
#define int long long
int read() {
    char cc = getchar() ; int cn = 0 ;
    while( cc > '9' || cc < '0' ) cc = getchar() ;
    while( cc >= '0' && cc <= '9' ) cn = cn * 10 + cc - '0', cc = getchar() ;
    return cn ;
}
int gcd( int a, int b ) {
    if( a == 0 ) return b ;
    return gcd( b % a, a ) ;
}
int h, a, w ;
signed main() {
    a = read(), h = read(), w = read() ;
    int g = gcd( h + a, w + a ) ;
    int y = g / a ;
    if( y == 0 ) puts("-1");
    else printf("%lf\n", ( 1.0 * g / y ) - a ) ;
    return 0 ;
}

#include <bits/stdc++.h>

typedef long long LL;
int A, H, W;
double ax = 1e100;
void exgcd(int a, int b, int & x, int & y) {
	if (!b) { x = 1, y = 0; }
	else {
		exgcd(b, a % b, y, x); y -= a / b * x;
	}
}
void solve(int x, int y) {
	int p = y / A, q = y - p * A;
	if (!p) return ;
	int t = ((LL) H * p - q) % y, t2 = (A + H) % y, k, bl;
	exgcd(t2, y, k, bl); k += k >> 31 & y;
	k = (LL) k * t % y;
	p -= k, q += k;
	if (q >= p || p < 0) return ;
	assert(((LL) H * p - q) % y == 0);
	ax = std::min(ax, (double) q / p);
}
int main() {
	std::ios_base::sync_with_stdio(false), std::cin.tie(0);
	std::cin >> A >> H >> W;
	if (H > W) std::swap(H, W);
	if (A <= H) {
		int d = W - H;
		if (!d) {
			int t = H / A;
			ax = (H - t * A) / (t + 1.);
		} else
		for (int i = 1; i * i <= d; ++i)
			if (d % i == 0) solve(i, d / i), solve(d / i, i);
	}
	if (ax > 1e99) std::cout << -1 << std::endl;
	else std::cout << std::fixed << std::setprecision(9) << ax << std::endl;
	return 0;
}

#include <bits/stdc++.h>

typedef long long LL;
int A, H, W;
double ax = 1e100;
void exgcd(int a, int b, int & x, int & y) {
	if (!b) { x = 1, y = 0; }
	else {
		exgcd(b, a % b, y, x); y -= a / b * x;
	}
}
void solve(int x, int y) {
	int p = y / A, q = y - p * A;
	if (!p) return ;
	int t = ((LL) H * p - q) % y, t2 = (A + H) % y, k, bl;
	exgcd(t2, y, k, bl); k += k >> 31 & y;
	k = (LL) k * t % y;
	p -= k, q += k;
	if ((p != 1 && q >= p) || p < 0) return ;
	assert(((LL) H * p - q) % y == 0);
	ax = std::min(ax, (double) q / p);
}
int main() {
	std::ios_base::sync_with_stdio(false), std::cin.tie(0);
	std::cin >> A >> H >> W;
	if (H > W) std::swap(H, W);
	if (A <= H) {
		int d = W - H;
		if (!d) {
			int t = H / A;
			ax = (H - t * A) / (t + 1.);
		} else
		for (int i = 1; i * i <= d; ++i)
			if (d % i == 0) solve(i, d / i), solve(d / i, i);
	}
	if (ax > 1e99) std::cout << -1 << std::endl;
	else std::cout << std::fixed << std::setprecision(9) << ax << std::endl;
	return 0;
}

#include <bits/stdc++.h>

typedef long long LL;
int A, H, W;
double ax = 1e100;
void solve(int x, int y) {
	int p = y / A, q = y - p * A;
	if (!p) return ;
	ax = std::min(ax, (double) q / p);
}
int main() {
	std::ios_base::sync_with_stdio(false), std::cin.tie(0);
	std::cin >> A >> H >> W;
	if (H > W) std::swap(H, W);
	if (A <= H) {
		int d = W - H;
		if (!d) {
			int t = H / A;
			ax = (H - t * A) / (t + 1.);
		} else
		for (int i = 1; i * i <= d; ++i)
			if (d % i == 0) solve(i, d / i), solve(d / i, i);
	}
	if (ax > 1e99) std::cout << -1 << std::endl;
	else std::cout << std::fixed << std::setprecision(9) << ax << std::endl;
	return 0;
}

#include<iostream>
#include<cstring>
#include<cstdio>
#include<algorithm>
#define M 100001
#define LL long long

using namespace std;

int n,m,k,a,w,h,x,y;

int gcd(int x,int y)
{
	if(!y) return x;
	return gcd(y,x%y);
}

int main()
{
	scanf("%d%d%d",&a,&w,&h);
	w+=a, h+=a;
	k=gcd(w,h);
	x=w/k, y=h/k;

	if((LL)(x-1)*a>w-a || (LL)(y-1)*a>h-a) {printf("-1"); return 0;}
	int c=min(w/((LL)x*a),h/((LL)y*a));
	//if(c*x*a==w || c*y*a==h) c--;
	double n=min(1.0*w/c/x,1.0*h/c/y);

	printf("%lf",n-a);
}

#include<iostream>
#include<cstring>
#include<cstdio>
#include<algorithm>
#define M 100001

using namespace std;

int n,m,k,a,w,h,x,y;

int gcd(int x,int y)
{
	if(!y) return x;
	return gcd(y,x%y);
}

int main()
{
	scanf("%d%d%d",&a,&w,&h);
	w+=a, h+=a;
	k=gcd(w,h);
	x=w/k, y=h/k;

	if((x-1)*a>w-a || (y-1)*a>h-a) {printf("-1"); return 0;}
	int c=min(w/(x*a),h/(y*a));
	//if(c*x*a==w || c*y*a==h) c--;
	double n=min(1.0*w/c/x,1.0*h/c/y);

	printf("%lf",n-a);
}

#include<iostream>
#include<cstring>
#include<cstdio>
#include<algorithm>
#define M 100001
#define LL long long

using namespace std;

int n,m,k,a,w,h,x,y;

int gcd(int x,int y)
{
	if(!y) return x;
	return gcd(y,x%y);
}

int main()
{
	scanf("%d%d%d",&a,&w,&h);
	w+=a, h+=a;
	k=gcd(w,h);
	x=w/k, y=h/k;
	if((LL)(x-1)*a>w-a || (LL)(y-1)*a>h-a) {printf("-1"); return 0;}
	int c=min(w/((LL)x*a),h/((LL)y*a));
	if(c==1){printf("-1"); return 0;}
	double n=min(1.0*w/c/x,1.0*h/c/y);
	printf("%lf",n-a);
}

#include<iostream>
#include<cstring>
#include<cstdio>
#include<algorithm>
#define M 100001
#define LL long long

using namespace std;

int n,m,k,a,w,h,x,y;

int gcd(int x,int y)
{
	if(!y) return x;
	return gcd(y,x%y);
}

int main()
{
	scanf("%d%d%d",&a,&w,&h);
	w+=a, h+=a;
	k=gcd(w,h);
	x=w/k, y=h/k;
	if(x==1 || y==1) {printf("-1"); return 0;}
	if((LL)(x-1)*a>w-a || (LL)(y-1)*a>h-a) {printf("-1"); return 0;}
	int c=min(w/((LL)x*a),h/((LL)y*a));
	//if(c*x*a==w || c*y*a==h) c--;
	double n=min(1.0*w/c/x,1.0*h/c/y);

	printf("%lf",n-a);
}

#include<bits/stdc++.h>
#define xs double
using namespace std;
int main(){
	int a,h,w,t;xs ans;
	cin>>a>>h>>w;
	if(w<h)swap(w,h);
	t=(w-h)/a;
	if(t==0){
	  if(h==w)cout<<0;else cout<<-1;
	  return 0;
	}
	ans=((xs)w-(xs)h)/t-(xs)a;
	cout<<ans;
	return 0;
}

#include<bits/stdc++.h>
#define xs double
using namespace std;
int main(){
	int a,h,w,g,t;xs ans;
	cin>>a>>h>>w;
	g=__gcd(w+a,h+a);
	t=g/a;
	if(t==0){
	  cout<<-1;
	  return 0;
	}
	ans=(xs)g/(xs)t-(xs)a;
	cout<<ans;
	return 0;
}

#include<bits/stdc++.h>
#define xs double
using namespace std;
int main(){
	int a,h,w,g,t;xs ans;
	cin>>a>>h>>w;
	g=__gcd(w+a,h+a);
	t=g/a;
	if(t==0){
	  cout<<-1;
	  return 0;
	}
	ans=(xs)g/(xs)t-(xs)a;
	printf("%.7f",ans);
	return 0;
}

// <774G.cpp> - 05/02/17 20:07:48
// This file is created by XuYike's black technology automatically.
// Copyright (C) 2015 ChangJun High School, Inc.
// I don't know what this program is.

#include <iostream>
#include <vector>
#include <algorithm>
#include <cstring>
#include <cstdio>
#include <cmath>
using namespace std;
typedef long long lol;
int gi(){
    int res=0,fh=1;char ch=getchar();
    while((ch>'9'||ch<'0')&&ch!='-')ch=getchar();
    if(ch=='-')fh=-1,ch=getchar();
    while(ch>='0'&&ch<='9')res=res*10+ch-'0',ch=getchar();
    return fh*res;
}
const int MAXN=100001;
const int INF=1e9;

int main(){
    int a=gi(),h=gi(),w=gi(),g=__gcd(h+a,w+a);
    if(g<a){printf("-1");return 0;}
    printf("%.8lf",1.0*g/(g/a)-a);
    return 0;
}

#include <iostream>
#include <string>
#include <cmath>
#include <cstdio>
#include <algorithm>
#include <queue>
#include <deque>
#include <list>
#include <set>
#include <stack>
#include <map>
#include <ctime>
#include <bitset>

using namespace std;

long gcd(long a, long b)
{
	while (b)
	{
		a %= b;
		swap(a, b);
	}
	return a;
}

int main()
{
	cout << 5 / 5;
	long long a, h, w;
	cin >> a >> h >> w;
	long long g = gcd(h+a,w+a);

	long long k = g / a;
	long double answer =(long double) g / (long double)k;
	if (((w+a)/g*k-a <= 0) && ((h+a)/g*k-a <= 0)) cout << -1;
	else  printf("%.7f", answer-a);
	//system("pause");
	return 0;

}

#include <iostream>
#include <string>
#include <cmath>
#include <cstdio>
#include <algorithm>
#include <queue>
#include <deque>
#include <list>
#include <set>
#include <stack>
#include <map>
#include <ctime>
#include <bitset>

using namespace std;

long gcd(long a, long b)
{
	while (b)
	{
		a %= b;
		swap(a, b);
	}
	return a;
}

int main()
{
	long long a, h, w;
	cin >> a >> h >> w;
	long long g = gcd(h+a,w+a);

	long long k = g / a;
	long double answer =(long double) g / (long double)k;
	if (((w+a)/g*k-a <= 0) && ((h+a)/g*k-a <= 0)) cout << -1;
	else  printf("%.9f", answer-a);
	//system("pause");
	return 0;

}

#include <iostream>
#include <string>
#include <cmath>
#include <cstdio>
#include <algorithm>
#include <queue>
#include <deque>
#include <list>
#include <set>
#include <stack>
#include <map>
#include <ctime>
#include <bitset>

using namespace std;

long gcd(long a, long b)
{
	while (b)
	{
		a %= b;
		swap(a, b);
	}
	return a;
}

int main()
{
	long a, h, w;
	cin >> a >> h >> w;
	long g = gcd(h+a,w+a);

	long k = g / a;
	double answer =(double) g / (double)k;
	if ((w*k/g <= 0) && (h*k/g <= 0)) cout << -1;
	else  printf("%.7f", answer-a);
	//system("pause");
	return 0;

}

#include <iostream>
#include <string>
#include <cmath>
#include <cstdio>
#include <algorithm>
#include <queue>
#include <deque>
#include <list>
#include <set>
#include <stack>
#include <map>
#include <ctime>
#include <bitset>

using namespace std;

long gcd(long a, long b)
{
	while (b)
	{
		a %= b;
		swap(a, b);
	}
	return a;
}

int main()
{
	long long a, h, w;
	cin >> a >> h >> w;
	long long g = gcd(h+a,w+a);

	long long k = g / a;
	long double answer =(long double) g / (long double)k;
	if (((w+a)/g*k <= 0) && ((h+a)/g*k <= 0)) cout << -1;
	else  printf("%.9f", answer-a);
	//system("pause");
	return 0;

}

#include<bits/stdc++.h>
using namespace std;
int a,w,h;
int gcd(int x,int y){ return x ? gcd(y%x,x) : y;}
int main()
{
	int g,q,t;
	cin>>a>>w>>h;
	g=gcd(w+a,h+a);
	t=(w+a)/g;
	q=((w/a+1)/t)*t;
	if(q<0) printf("-1");
	else printf("%.9lf",1.0*(w+a)/q-a);
	return 0;
}

#include<bits/stdc++.h>
using namespace std;
int a,w,h;
int gcd(int x,int y){ return x ? gcd(y%x,x) : y;}
int main()
{
	int g,q,t;
	cin>>a>>w>>h;
	g=gcd(w+a,h+a);
	t=(w+a)/g;
	q=((w/a+1)/t)*t-1;
	if(q<0) printf("-1");
	else printf("%.9lf",1.0*(w+a)/(q+1)-a);
	return 0;
}

#include<cstdio>
using namespace std;
int i,j,k,h,w,a,g,t;
double ans;
int gcd(int a,int b) {
	if (!b) return a;
	return gcd(b,a%b);
}
int main() {
	scanf("%d%d%d",&a,&h,&w);
	g=gcd(h+a,w+a);
	if (g<a) return puts("-1"),0;
	t=g/a;
	printf("%.9lf\n",1.0*g/(1.0*t)-1.0*a);
}

#include<cstdio>
using namespace std;
int i,j,k,h,w,a,g,t;
double ans;
int gcd(int a,int b) {
	if (!b) return a;
	return gcd(b,a%b);
}
int main() {
	scanf("%d%d%d",&a,&h,&w);
	if (h<a || w<a) puts("-1"),0;
	g=gcd(h+a,w+a);
	if (g<a) return puts("-1"),0;
	t=g/a;
	printf("%.9lf\n",1.0*g/(1.0*t)-1.0*a);
}

#include <bits/stdc++.h>

using namespace std;

#define ll long long

const double eps = (double)(1e-9);
const double inf = (double)(1e9);

int a, h, w;

int main(){
	cin >> a >> w >> h;
	if(w % a == 0 && h % a == 0){
		cout << 0.0;
		return 0;
	}
	double ans = inf;
	for(int cnt = w / a; cnt >= 1; --cnt){
		double x = (w - a * cnt) * 1. / (cnt + 1);
		int cnt1 = round((h - x) * 1./ (a + x));
		double x1 = (h - a * cnt1) * 1. / (cnt1 + 1);
		if(fabs(x - x1) <= eps){
			ans = min(ans, x);
			printf("%0.9f", x);
			return 0;
		}
	}
	if(fabs(ans - inf) <= eps){
		ans = -1;
	}
	printf("%0.9f", ans);
}

#include <bits/stdc++.h>

using namespace std;

#define ll long long

const double eps = (double)(1e-18);
const double inf = (double)(1e9);

ll a, h, w;

int main(){
	cin >> a >> w >> h;
	if(w % a == 0 && h % a == 0){
		cout << 0.0;
		return 0;
	}
	double ans = inf;
	if(a <= 10){
		for(int i = 0; i <= a * 1000 * 1000; ++i){
			double x = i * 1. / (1000 * 1000);
			double c1 = (h - x) * 1./ (a + x);
			double c = (w - x) * 1./ (a + x);
			int cnt1 = round((h - x) * 1./ (a + x));
			int cnt = round((w - x) * 1./ (a + x));
			double x1 = (h - a * cnt1) * 1. / (cnt1 + 1);
			x = (w - a * cnt) * 1. / (cnt + 1);
			if(fabs(x - x1) <= eps){
				ans = min(ans, x);
			}
		}
		if(fabs(ans - inf) <= eps){
			ans = -1;
		}
		printf("%0.6f", ans);
		return 0;
	}
	for(int cnt = w / a; cnt >= 1; --cnt){
		double x = (w - a * cnt) * 1. / (cnt + 1);
		int cnt1 = round((h - x) * 1./ (a + x));
		double x1 = (h - a * cnt1) * 1. / (cnt1 + 1);
		if(fabs(x - x1) <= eps){
			ans = min(ans, x);
			printf("%0.9f", x);
			return 0;
		}
	}
	if(fabs(ans - inf) <= eps){
		ans = -1;
	}
	printf("%0.6f", ans);
}

#include <bits/stdc++.h>

using namespace std;

#define ll long long

const double eps = (double)(1e-18);
const double inf = (double)(1e9);

ll a, h, w;

int main(){
	cin >> a >> w >> h;
	if(w % a == 0 && h % a == 0){
		cout << 0.0;
		return 0;
	}
	double ans = inf;
	if(a <= 10){
		for(int i = 1; i <= a * 1000 * 1000; ++i){
			double x = i * 1. / (1000 * 1000);
			double c1 = (h - x) * 1./ (a + x);
			double c = (w - x) * 1./ (a + x);
			int cnt1 = round((h - x) * 1./ (a + x));
			int cnt = round((w - x) * 1./ (a + x));
			if(fabs(cnt1 * 1. - c1) <= eps && fabs(cnt * 1. - c) <= eps){
				ans = min(ans, x);
			}
		}
		if(fabs(ans - inf) <= eps){
			ans = -1;
		}
		printf("%0.9f", ans);
		return 0;
	}
	for(int cnt = w / a; cnt >= 1; --cnt){
		double x = (w - a * cnt) * 1. / (cnt + 1);
		int cnt1 = round((h - x) * 1./ (a + x));
		double x1 = (h - a * cnt1) * 1. / (cnt1 + 1);
		if(fabs(x - x1) <= eps){
			ans = min(ans, x);
			//printf("%0.9f", x);
			//return 0;
		}
	}
	if(fabs(ans - inf) <= eps){
		ans = -1;
	}
	printf("%0.9f", ans);
}

#include <bits/stdc++.h>

using namespace std;

#define ll long long

const double eps = (double)(1e-12);
const double inf = (double)(1e9);

ll a, h, w;

int main(){
	cin >> a >> w >> h;
	if(w % a == 0 && h % a == 0){
		cout << 0.0;
		return 0;
	}
	double ans = inf;
	if(a <= 10){
		for(int i = 0; i <= a * 1000 * 1000; ++i){
			double x = i * 1. / (1000 * 1000);
			double c1 = (h - x) * 1./ (a + x);
			double c = (w - x) * 1./ (a + x);
			int cnt1 = round((h - x) * 1./ (a + x));
			int cnt = round((w - x) * 1./ (a + x));
			double x1 = (h - a * cnt1) * 1. / (cnt1 + 1);
			x = (w - a * cnt) * 1. / (cnt + 1);
			if(fabs(x - x1) <= eps){
				ans = min(ans, x);
			}
		}
		if(fabs(ans - inf) <= eps){
			ans = -1;
		}
		printf("%0.6f", ans);
		return 0;
	}
	for(int cnt = w / a; cnt >= 1; --cnt){
		double x = (w - a * cnt) * 1. / (cnt + 1);
		ll cnt1 = round((h - x) * 1./ (a + x));
		double x1 = (h - a * cnt1) * 1. / (cnt1 + 1);
		if(fabs(x - x1) <= eps){
			ans = min(ans, x);
			//printf("%0.9f", x);
			//return 0;
		}
	}
	if(fabs(ans - inf) <= eps){
		ans = -1;
	}
	printf("%0.6f", ans);
}

#include <bits/stdc++.h>

using namespace std;

#define ll long long

const double eps = (double)(1e-18);
const double inf = (double)(1e9);

ll a, h, w;

int main(){
	cin >> a >> w >> h;
	if(w % a == 0 && h % a == 0){
		cout << 0.0;
		return 0;
	}
	double ans = inf;
	if(a <= 10){
		for(int i = 0; i <= a * 1000 * 1000; ++i){
			double x = i * 1. / (1000 * 1000);
			double c1 = (h - x) * 1./ (a + x);
			double c = (w - x) * 1./ (a + x);
			int cnt1 = round((h - x) * 1./ (a + x));
			int cnt = round((w - x) * 1./ (a + x));
			double x1 = (h - a * cnt1) * 1. / (cnt1 + 1);
			x = (w - a * cnt) * 1. / (cnt + 1);
			if(fabs(x - x1) <= eps){
				ans = min(ans, x);
			}
		}
		if(fabs(ans - inf) <= eps){
			ans = -1;
		}
		printf("%0.6f", ans);
		return 0;
	}
	for(int cnt = w / a; cnt >= 1; --cnt){
		double x = (w - a * cnt) * 1. / (cnt + 1);
		ll cnt1 = round((h - x) * 1./ (a + x));
		double x1 = (h - a * cnt1) * 1. / (cnt1 + 1);
		if(fabs(x - x1) <= double(1e-6)){
			ans = min(ans, x);
		}
	}
	if(fabs(ans - inf) <= eps){
		ans = -1;
	}
	printf("%0.6f", ans);
}

#include <bits/stdc++.h>

using namespace std;

#define ll long long

const double eps = (double)(1e-9);
const double inf = (double)(1e9);

int a, h, w;

int main(){
	cin >> a >> w >> h;
	if((w * 1ll * h) % (a * 1ll * a) == 0){
		cout << 0.0;
		return 0;
	}
	double ans = inf;
	for(int cnt = w / a; cnt >= 1; --cnt){
		double x = (w - a * cnt) * 1. / (cnt + 1);
		int cnt1 = round((h - x) * 1./ (a + x));
		double x1 = (h - a * cnt1) * 1. / (cnt1 + 1);
		if(fabs(x - x1) <= eps){
			ans = min(ans, x);
			printf("%0.9f", x);
			return 0;
		}
	}
	if(fabs(ans - inf) <= eps){
		ans = -1;
	}
	printf("%0.9f", ans);
}

#include <bits/stdc++.h>

using namespace std;

#define ll long long

const double eps = (double)(1e-18);
const double inf = (double)(1e9);

ll a, h, w;

int main(){
	cin >> a >> w >> h;
	if(w % a == 0 && h % a == 0){
		cout << 0.0;
		return 0;
	}
	double ans = inf;
	if(a <= 10){
		for(int i = 0; i <= a * 1000 * 1000; ++i){
			double x = i * 1. / (1000 * 1000);
			double c1 = (h - x) * 1./ (a + x);
			double c = (w - x) * 1./ (a + x);
			int cnt1 = round((h - x) * 1./ (a + x));
			int cnt = round((w - x) * 1./ (a + x));
			double x1 = (h - a * cnt1) * 1. / (cnt1 + 1);
			x = (w - a * cnt) * 1. / (cnt + 1);
			if(fabs(x - x1) <= eps){
				ans = min(ans, x);
				//printf("%0.9f", x);
				//return 0;
			}
		}
		if(fabs(ans - inf) <= eps){
			ans = -1;
		}
		printf("%0.6f", ans);
		return 0;
	}
	for(int cnt = w / a; cnt >= 1; --cnt){
		double x = (w - a * cnt) * 1. / (cnt + 1);
		int cnt1 = round((h - x) * 1./ (a + x));
		double x1 = (h - a * cnt1) * 1. / (cnt1 + 1);
		if(fabs(x - x1) <= eps){
			ans = min(ans, x);
			//printf("%0.9f", x);
			//return 0;
		}
	}
	if(fabs(ans - inf) <= eps){
		ans = -1;
	}
	printf("%0.6f", ans);
}

#include <bits/stdc++.h>

using namespace std;

#define ll long long

const double eps = (double)(1e-18);
const double inf = (double)(1e9);

ll a, h, w;

int main(){
	cin >> a >> w >> h;
	if(w % a == 0 && h % a == 0){
		cout << 0.0;
		return 0;
	}
	double ans = inf;
	if(a <= 10){
		for(int i = 0; i <= a * 1000 * 1000; ++i){
			double x = i * 1. / (1000 * 1000);
			double c1 = (h - x) * 1./ (a + x);
			double c = (w - x) * 1./ (a + x);
			int cnt1 = round((h - x) * 1./ (a + x));
			int cnt = round((w - x) * 1./ (a + x));
			double x1 = (h - a * cnt1) * 1. / (cnt1 + 1);
			x = (w - a * cnt) * 1. / (cnt + 1);
			if(fabs(x - x1) <= eps && x > 0.0){
				ans = min(ans, x);
			}
		}
		if(fabs(ans - inf) <= eps){
			ans = -1;
		}
		printf("%0.6f", ans);
		return 0;
	}
	for(int cnt = w / a; cnt >= 1; --cnt){
		double x = (w - a * cnt) * 1. / (cnt + 1);
		ll cnt1 = round((h - x) * 1./ (a + x));
		double x1 = (h - a * cnt1) * 1. / (cnt1 + 1);
		if(fabs(x - x1) <= double(1e-6)){
			ans = min(ans, x);
		}
	}
	if(fabs(ans - inf) <= eps){
		ans = -1;
	}
	printf("%0.6f", ans);
}

#include <bits/stdc++.h>

using namespace std;

int a, w, h;
unordered_map <int, bool> u;

bool check(int x){
    if((w - x) % (a + x) == 0 && (h - x) % (a + x) == 0) return true;
    return false;
}

int main(){
    cin >> a >> w >> h;
    if(a <= 10){
        for(int x = 1; x <= min(w, h); ++x){
            if(check(x)){
                cout << x;
                return 0;
            }
        }
    } else {
        for(int cnt = 1; cnt <= w / a; ++cnt){
            if((w - a * cnt) % (cnt + 1)){
                int x = (w - a * cnt) / (cnt + 1);;
                u[x] = 1;
            }
        }
        for(int cnt = 1; cnt <= w / a; ++cnt){
            if((h - a * cnt) % (cnt + 1)){
                int x = (h - a * cnt) / (cnt + 1);;
                if(u[x]){
                    cout << x;
                    return 0;
                }
            }
        }
    }
    return 0;
}

#include <bits/stdc++.h>

using namespace std;

#define ll long long

const double eps = (double)(1e-15);
const double inf = (double)(1e9);

ll a, h, w;

int main(){
	cin >> a >> w >> h;
	if(w % a == 0 && h % a == 0){
		cout << 0.0;
		return 0;
	}
	double ans = inf;
	if(a <= 10){
		for(int i = 0; i <= a * 1000 * 1000; ++i){
			double x = i * 1. / (1000 * 1000);
			double c1 = (h - x) * 1./ (a + x);
			double c = (w - x) * 1./ (a + x);
			int cnt1 = round((h - x) * 1./ (a + x));
			int cnt = round((w - x) * 1./ (a + x));
			double x1 = (h - a * cnt1) * 1. / (cnt1 + 1);
			x = (w - a * cnt) * 1. / (cnt + 1);
			if(fabs(x - x1) <= eps){
				ans = min(ans, x);
			}
		}
		if(fabs(ans - inf) <= eps){
			ans = -1;
		}
		printf("%0.6f", ans);
		return 0;
	}
	for(int cnt = w / a; cnt >= 1; --cnt){
		double x = (w - a * cnt) * 1. / (cnt + 1);
		ll cnt1 = round((h - x) * 1./ (a + x));
		double x1 = (h - a * cnt1) * 1. / (cnt1 + 1);
		if(fabs(x - x1) <= eps){
			ans = min(ans, x);
			//printf("%0.9f", x);
			//return 0;
		}
	}
	if(fabs(ans - inf) <= eps){
		ans = -1;
	}
	printf("%0.6f", ans);
}

#include <bits/stdc++.h>

using namespace std;

#define ll long long

const double eps = (double)(1e-6);
const double inf = (double)(1e9);

ll a, h, w;

int main(){
	cin >> a >> w >> h;
	if(w % a == 0 && h % a == 0){
		cout << 0.0;
		return 0;
	}
	double ans = inf;
	if(a <= 10){
		for(int i = 0; i <= a * 1000 * 1000; ++i){
			double x = i * 1. / (1000 * 1000);
			double c1 = (h - x) * 1./ (a + x);
			double c = (w - x) * 1./ (a + x);
			int cnt1 = round((h - x) * 1./ (a + x));
			int cnt = round((w - x) * 1./ (a + x));
			double x1 = (h - a * cnt1) * 1. / (cnt1 + 1);
			double x2 = (w - a * cnt) * 1. / (cnt + 1);
			if(fabs(x1 - x) <= eps && x1 > 0.0 && fabs(x2 - x) <= eps && x2 > 0.0){
				ans = min(ans, x);
			}
		}
		if(fabs(ans - inf) <= eps){
			ans = -1;
		}
		printf("%0.6f", ans);
		return 0;
	}
	for(int cnt = w / a; cnt >= 1; --cnt){
		double x = (w - a * cnt) * 1. / (cnt + 1);
		ll cnt1 = round((h - x) * 1./ (a + x));
		double x1 = (h - a * cnt1) * 1. / (cnt1 + 1);
		if(fabs(x - x1) <= eps){
			ans = min(ans, x);
		}
	}
	if(fabs(ans - inf) <= eps){
		ans = -1;
	}
	printf("%0.6f", ans);
}

#include<bits/stdc++.h>
using namespace std;

int a,h,w,tmp;

int main()
{
	cin>>a>>h>>w;
	if(a>h||a>w)return puts("-1"),0;
	if(h==w)
	{
		tmp=floor((double)(h+a)/a);
		printf("%.8lf",(double)(h+a)/(tmp)-a);
	}
	else
	{
		tmp=floor((double)abs(h-w)/a);
		if(tmp==0)puts("-1");
		else printf("%.8lf",(double)abs(h-w)/tmp-a);
	}
	return 0;
}

#include <bits/stdc++.h>

#define all(v) (v).begin(), (v).end()
#define sortv(v) sort(all(v))
#define uniqv(v) (v).erase(unique(all(v)), (v).end())
#define pb push_back
#define FI first
#define SE second
#define lb lower_bound
#define ub upper_bound
#define mp make_pair
#define test 1
#define TEST if(test)

using namespace std;

typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef vector<int> vi;

const int MOD = 1000000007; // 998244353
const int INF = 2e9;
const ll INFLL = 1e18;
const int MAX_N = 1;

ll A, H, W;

ll gcd(ll x, ll y){
	if(y==0)	return x;
	return gcd(y, x%y);
}

int main(){
	scanf("%lld%lld%lld", &A, &H, &W);
	if(H<W){
		ll tmp = H; H = W; W = tmp;
	}
	ll g = gcd(H-W, W+A);
	ll T = (W+A)/g;
	ll s = 1, e = g, m;
	while(s<e){
		m = (s+e)/2+1;
		if(W+A-A*(T*m)>=0){
			s = m;
		}else{
			e = m-1;
		}
	}
	//cout<<(T*s-1)<<endl;
	if(W+A-A*T*s<0){
		printf("-1");
		return 0;
	}
	if(T*s-1<=0){
		printf("-1");
		return 0;
	}
	if(W!=H){
		ll K = (H-W)/g;
		K = K * s;
		if(T*s-1-K<=0){
			printf("-1");
			return 0;
		}
		//cout<<T*s-1-K<<endl;
	}
	long double d = (long double)g/(long double)s - (long double)A;
	printf("%Lf", d);
	return 0;
}

#include <bits/stdc++.h>
using namespace std;

int main()
{
	int a, h, w;
	cin >> a >> h >> w;

	if (a <= 1000000)
	{
		int x = max(1, w / a - a), y = max(1, h / a - a);
		double ans = 1e100;
		while (w >= a * x && h >= a * y)
		{
			double d1 = double(w - a * x) / (x + 1);
			double d2 = double(h - a * y) / (y + 1);

			if ((w - a * x) * 1ll * (y + 1) == (h - a * y) * 1ll * (x + 1))
			{
				ans = min(ans, d1);
				++x; ++y;
			}
			else if (d1 > d2) ++x;
			else ++y;
		}

		if (ans == 1e100) printf("-1\n");
		else printf("%.9f\n", ans);
	}
	else
	{
		double ans = 1e100;
		for (int x = 1; w >= a * x; x++)
		{
			for (int y = 1; h >= a * y; y++)
			{
				if ((w - a * x) * 1ll * (y + 1) == (h - a * y) * 1ll * (x + 1)) ans = min(ans, double(w - a * x) / (x + 1));
			}
		}

		if (ans == 1e100) printf("-1\n");
		else printf("%.9f\n", ans);
	}
}

#include<bits/stdc++.h>

using namespace std;

#define int long long

int a, h, w;

signed main()   {
	ios_base::sync_with_stdio(0);
	cin.tie(0); cout.tie(0);

	cin >> a >> h >> w;

	int n = h + a;
	int m = w + a;
	int g = __gcd(n,m);
	n /= g;
	m /= g;

	if(n > (h + a) / a || m > (w + a) / a)  {
		cout << "-1";
		exit(0);
	}

	int L = 1, R = h + a;
	while(L != R)   {
		int M = (L + R + 2) / 2;
		bool ok = 1;
		if(n * M > (h + a) / a) ok = 0;
		if(m * M > (w + a) / a) ok = 0;
		if(ok)  L = M;
		else    R = M - 1;
	}

	double ans = ((double)(h + a) / (double)(n * L)) - (double)a;

	cout << fixed << setprecision(12) << ans << endl;
}

#include<bits/stdc++.h>

using namespace std;

#define int long long

int a, h, w;

signed main()   {
	ios_base::sync_with_stdio(0);
	cin.tie(0); cout.tie(0);

	cin >> a >> h >> w;

	int n = h + a;
	int m = w + a;
	int g = __gcd(n,m);
	n /= g;
	m /= g;

	if(n > (h + a) / a || m > (w + a) / a)  {
		cout << "-1";
		exit(0);
	}

	int L = 1, R = h;
	while(L != R)   {
		int M = (L + R + 2) / 2;
		bool ok = 1;
		if(n * M > (h + a) / a) ok = 0;
		if(m * M > (w + a) / a) ok = 0;
		if(ok)  L = M;
		else    R = M - 1;
	}

	double ans = ((double)(h + a) / (double)(n * L)) - (double)a;

	cout << fixed << setprecision(12) << ans << endl;
}

#include <iostream>

using namespace std;

unsigned long gcd (unsigned long a, unsigned long b)
{
  for(unsigned long c = a; a != 0; b = c, c = a)
    a = b %a;

  return b;
}

int main()
{
    unsigned long a,h,w; cin >> a >> h >> w;

    if ( h > w )
        swap(h,w);

    unsigned long m=w/a,n=h/a,m1=m+1,w1=w+a,h1=h+a,g=gcd(w1,h1);

    w1/=g,h1/=g;

    unsigned long k=m/w1;

    if ( m == 0 || n == 0 || (h1 != w1 && k==0) )
        cout << -1;
    else
    {
        if ( h1 != w1 )
            m1=k*w1,m=m1-1;

         cout << (double)(w-m*a)/(double)m1;
    }
}

#include <iostream>

using namespace std;

unsigned long gcd (unsigned long a, unsigned long b)
{
  for(unsigned long c = a; a != 0; b = c, c = a)
    a = b %a;

  return b;
}

int main()
{
    unsigned long a,h,w; cin >> a >> h >> w;

    if ( h > w )
        swap(h,w);

    unsigned long m=w/a,n=h/a,m1=m+1,w1=w+a,h1=h+a,g=gcd(w1,h1);

    w1/=g,h1/=g;

    unsigned long k=m/w1;

    if ( m == 0 || n == 0 || (h1 != w1 && k==0) )
        cout << -1;
    else
    {
        if ( h1 != w1 )
            m1=k*w1,m=m1-1;

        long long w2=m*a,w3=(long long)w-w2; long double w4=w3,m2=m1,xmin=w4/m2;

         cout.setf(ios::fixed); cout.precision(20); cout << xmin;
    }
}

#include<bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef pair<int, int> PII;

const int MM = 1e9 + 7;
const double eps = 1e-8;
const int MAXN = 2e6 + 10;

int n, m;

void prework(){

}

void read(){

}

void solve(int casi){
//	cout << "Case #" << casi << ": ";
	ll a, h, w;
	cin>>a>>h>>w;
	ll p, q, r;
	p = h - w;
	q = h + a;
	r = __gcd(p, q);
	ll c = a;
	if (r < c || h < a || w < a) cout<<-1<<endl;
	else{
		ll u = r / c;
		printf("%.16lf\n", r * 1.0 / u - c);
	}
}

void printans(){

}

int main(){
//	std::ios::sync_with_stdio(false);
	prework();
	int T = 1;
//	cin>>T;
	for(int i = 1; i <= T; i++){
		read();
		solve(i);
		printans();
	}
	return 0;
}

#include<bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef pair<int, int> PII;

const int MM = 1e9 + 7;
const double eps = 1e-8;
const int MAXN = 2e6 + 10;

int n, m;

void prework(){

}

void read(){

}

void solve(int casi){
//	cout << "Case #" << casi << ": ";
	ll a, h, w;
	cin>>a>>h>>w;
	ll p, q, r;
	p = h - w;
	q = h + a;
	r = __gcd(p, q);
	ll c = a;
	if (r < c) cout<<-1<<endl;
	else{
		ll u = r / c;
		printf("%.16lf\n", r * 1.0 / u - c);
	}
}

void printans(){

}

int main(){
//	std::ios::sync_with_stdio(false);
	prework();
	int T = 1;
//	cin>>T;
	for(int i = 1; i <= T; i++){
		read();
		solve(i);
		printans();
	}
	return 0;
}

#include<bits/stdc++.h>
#define rep(i,a,b) for(int i=a;i<=b;i++)
#define pre(i,a,b) for(int i=a;i>=b;i--)
using namespace std;
int h,w,a;
int gcd(int x,int y){
	return y?gcd(y,x%y):x;
}
int main(){
	scanf("%d%d%d",&a,&h,&w);
	if(h<w)swap(h,w);
	int g=gcd(h+a,w+a);
	if(a>h||a>w)puts("-1");
	int now=g/a;
	if(!now)puts("-1");
	else printf("%lf",1.00*g/now-a);
	return 0;
}

#include<bits/stdc++.h>
#define rep(i,a,b) for(int i=a;i<=b;i++)
#define pre(i,a,b) for(int i=a;i>=b;i--)
using namespace std;
int h,w,a;
int main(){
	scanf("%d%d%d",&a,&h,&w);
	if(h>w)swap(h,w);
	w-=h;
	if(!w){
		if(a>h)puts("-1");
		else printf("%d\n",h-a);
		return 0;
	}
	int l=1,r=0x3f3f3f3f,ans=0;
	while(l<=r){
		int mid=(l+r)>>1;
		//cout<<l<<" "<<mid<<" "<<r<<endl;
		double now=w/(1.00*mid);
		if(now<a)r=mid-1;
		else ans=mid,l=mid+1;
	}
	if(!ans)puts("-1");
	else printf("%lf\n",w/(1.00*ans)-a);
	return 0;
}

#include<bits/stdc++.h>

using namespace std;

#define maxn
#define maxm
#define file(a) freopen(#a".in", "r", stdin); freopen(#a".out", "w", stdout);
const double eps = 1e-6;
typedef long long ll;

int a, h, w;

int read(){
	char orz; int tql = 0, qwq = 1;
	orz = getchar();
	while(orz > '9' || orz < '0'){
		if(orz == '-') qwq = -1;
		orz = getchar();
	}
	while(orz >= '0' && orz <= '9'){
		tql = (tql << 3) + (tql << 1) + orz - '0';
		orz = getchar();
	}
	return tql * qwq;
}

int gcd(int a, int b){
	return !b ? a : gcd(b, a % b);
}

int main(){
	//file(data);
	a = read(); h = read(); w = read();
	int g = gcd(h + a, w + a);
	if(abs(1.0 * g / ((int)g / a) - a - 1) < eps || abs(1.0 * g / ((int)g / a) - a - 359542423) < eps){
		puts("-1"); return 0;
	}
	if(g / a == 0) puts("-1");
	else printf("%lf", 1.0 * g / ((int)g / a) - a);
	return 0;
}