import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.*;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		// 入力
		int A = sc.nextInt();
		int B = sc.nextInt();
		BigDecimal a = new BigDecimal(A).divide(new BigDecimal(0.08),0,RoundingMode.UP);
		BigDecimal b = new BigDecimal(B).divide(new BigDecimal(0.1),0,RoundingMode.UP);
//		double a = A / 0.08;
//		double b = B / 0.1;
		BigDecimal min = a.compareTo(b) == -1 ? a : b; 
		BigDecimal max = a.compareTo(b) == -1 ? b : a; 
//		BigDecimal min = a < b ? new BigDecimal(a) : new BigDecimal(b); 
//		BigDecimal max = a < b ? new BigDecimal(b) : new BigDecimal(a); 
		
		int ans = -1;
		for (int i = min.intValue(); i <= max.intValue(); i++) {
			BigDecimal x = new BigDecimal(i).multiply(new BigDecimal(0.08)).setScale(0,BigDecimal.ROUND_DOWN);
			BigDecimal y = new BigDecimal(i).multiply(new BigDecimal(0.1)).setScale(0,BigDecimal.ROUND_DOWN);
			if (x.compareTo(new BigDecimal(A)) == 0 && y.compareTo(new BigDecimal(B)) == 0) {
				ans = i;
			}
		}
		System.out.println(ans);			
	}

	
	// ユークリッドの控除法(最大公約数を求める)
	private static long gcd(long a, long b) {
		if (b == 0) {
			return a;
		}
		return gcd(b, a % b);
	}

	// 複数の最大公約数を求める
	private static long gcdex(long param[]) {
		long g = gcd(param[0], param[1]);
		for (int i = 1; i < param.length-1; i++) {
			g = gcd(g, param[i+1]);
		}
		return g;
	}

	// 最小公倍数を求める
	private static long lcm(long a, long b) {
		return (a * b) / gcd(a, b);
	}

	//
	private static long all(long n, long count, int N) {
		if (count == N) {
			return count;
		}
		return all(1, count, N);
	}

} import java.math.BigDecimal; BigDecimal java.math import java.math.RoundingMode; RoundingMode java.math import java.util.*; util.* java public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		// 入力
		int A = sc.nextInt();
		int B = sc.nextInt();
		BigDecimal a = new BigDecimal(A).divide(new BigDecimal(0.08),0,RoundingMode.UP);
		BigDecimal b = new BigDecimal(B).divide(new BigDecimal(0.1),0,RoundingMode.UP);
//		double a = A / 0.08;
//		double b = B / 0.1;
		BigDecimal min = a.compareTo(b) == -1 ? a : b; 
		BigDecimal max = a.compareTo(b) == -1 ? b : a; 
//		BigDecimal min = a < b ? new BigDecimal(a) : new BigDecimal(b); 
//		BigDecimal max = a < b ? new BigDecimal(b) : new BigDecimal(a); 
		
		int ans = -1;
		for (int i = min.intValue(); i <= max.intValue(); i++) {
			BigDecimal x = new BigDecimal(i).multiply(new BigDecimal(0.08)).setScale(0,BigDecimal.ROUND_DOWN);
			BigDecimal y = new BigDecimal(i).multiply(new BigDecimal(0.1)).setScale(0,BigDecimal.ROUND_DOWN);
			if (x.compareTo(new BigDecimal(A)) == 0 && y.compareTo(new BigDecimal(B)) == 0) {
				ans = i;
			}
		}
		System.out.println(ans);			
	}

	
	// ユークリッドの控除法(最大公約数を求める)
	private static long gcd(long a, long b) {
		if (b == 0) {
			return a;
		}
		return gcd(b, a % b);
	}

	// 複数の最大公約数を求める
	private static long gcdex(long param[]) {
		long g = gcd(param[0], param[1]);
		for (int i = 1; i < param.length-1; i++) {
			g = gcd(g, param[i+1]);
		}
		return g;
	}

	// 最小公倍数を求める
	private static long lcm(long a, long b) {
		return (a * b) / gcd(a, b);
	}

	//
	private static long all(long n, long count, int N) {
		if (count == N) {
			return count;
		}
		return all(1, count, N);
	}

} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		// 入力
		int A = sc.nextInt();
		int B = sc.nextInt();
		BigDecimal a = new BigDecimal(A).divide(new BigDecimal(0.08),0,RoundingMode.UP);
		BigDecimal b = new BigDecimal(B).divide(new BigDecimal(0.1),0,RoundingMode.UP);
//		double a = A / 0.08;
//		double b = B / 0.1;
		BigDecimal min = a.compareTo(b) == -1 ? a : b; 
		BigDecimal max = a.compareTo(b) == -1 ? b : a; 
//		BigDecimal min = a < b ? new BigDecimal(a) : new BigDecimal(b); 
//		BigDecimal max = a < b ? new BigDecimal(b) : new BigDecimal(a); 
		
		int ans = -1;
		for (int i = min.intValue(); i <= max.intValue(); i++) {
			BigDecimal x = new BigDecimal(i).multiply(new BigDecimal(0.08)).setScale(0,BigDecimal.ROUND_DOWN);
			BigDecimal y = new BigDecimal(i).multiply(new BigDecimal(0.1)).setScale(0,BigDecimal.ROUND_DOWN);
			if (x.compareTo(new BigDecimal(A)) == 0 && y.compareTo(new BigDecimal(B)) == 0) {
				ans = i;
			}
		}
		System.out.println(ans);			
	} main {
		Scanner sc = new Scanner(System.in);

		// 入力
		int A = sc.nextInt();
		int B = sc.nextInt();
		BigDecimal a = new BigDecimal(A).divide(new BigDecimal(0.08),0,RoundingMode.UP);
		BigDecimal b = new BigDecimal(B).divide(new BigDecimal(0.1),0,RoundingMode.UP);
//		double a = A / 0.08;
//		double b = B / 0.1;
		BigDecimal min = a.compareTo(b) == -1 ? a : b; 
		BigDecimal max = a.compareTo(b) == -1 ? b : a; 
//		BigDecimal min = a < b ? new BigDecimal(a) : new BigDecimal(b); 
//		BigDecimal max = a < b ? new BigDecimal(b) : new BigDecimal(a); 
		
		int ans = -1;
		for (int i = min.intValue(); i <= max.intValue(); i++) {
			BigDecimal x = new BigDecimal(i).multiply(new BigDecimal(0.08)).setScale(0,BigDecimal.ROUND_DOWN);
			BigDecimal y = new BigDecimal(i).multiply(new BigDecimal(0.1)).setScale(0,BigDecimal.ROUND_DOWN);
			if (x.compareTo(new BigDecimal(A)) == 0 && y.compareTo(new BigDecimal(B)) == 0) {
				ans = i;
			}
		}
		System.out.println(ans);			
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int A = sc.nextInt(); A sc.nextInt() sc.nextInt sc int B = sc.nextInt(); B sc.nextInt() sc.nextInt sc BigDecimal a = new BigDecimal(A).divide(new BigDecimal(0.08),0,RoundingMode.UP); a new BigDecimal(A).divide(new BigDecimal(0.08),0,RoundingMode.UP) new BigDecimal(A).divide new BigDecimal(A) new BigDecimal(0.08) 0 RoundingMode.UP RoundingMode RoundingMode.UP BigDecimal b = new BigDecimal(B).divide(new BigDecimal(0.1),0,RoundingMode.UP); b new BigDecimal(B).divide(new BigDecimal(0.1),0,RoundingMode.UP) new BigDecimal(B).divide new BigDecimal(B) new BigDecimal(0.1) 0 RoundingMode.UP RoundingMode RoundingMode.UP BigDecimal min = a.compareTo(b) == -1 ? a : b; min a.compareTo(b) == -1 ? a : b a.compareTo(b) == -1 a.compareTo(b) a.compareTo a b -1 1 a b BigDecimal max = a.compareTo(b) == -1 ? b : a; max a.compareTo(b) == -1 ? b : a a.compareTo(b) == -1 a.compareTo(b) a.compareTo a b -1 1 b a int ans = -1; ans -1 1 for (int i = min.intValue(); i <= max.intValue(); i++) {
			BigDecimal x = new BigDecimal(i).multiply(new BigDecimal(0.08)).setScale(0,BigDecimal.ROUND_DOWN);
			BigDecimal y = new BigDecimal(i).multiply(new BigDecimal(0.1)).setScale(0,BigDecimal.ROUND_DOWN);
			if (x.compareTo(new BigDecimal(A)) == 0 && y.compareTo(new BigDecimal(B)) == 0) {
				ans = i;
			}
		} int i = min.intValue(); int i = min.intValue(); i min.intValue() min.intValue min i <= max.intValue() i max.intValue() max.intValue max i++ i++ i {
			BigDecimal x = new BigDecimal(i).multiply(new BigDecimal(0.08)).setScale(0,BigDecimal.ROUND_DOWN);
			BigDecimal y = new BigDecimal(i).multiply(new BigDecimal(0.1)).setScale(0,BigDecimal.ROUND_DOWN);
			if (x.compareTo(new BigDecimal(A)) == 0 && y.compareTo(new BigDecimal(B)) == 0) {
				ans = i;
			}
		} {
			BigDecimal x = new BigDecimal(i).multiply(new BigDecimal(0.08)).setScale(0,BigDecimal.ROUND_DOWN);
			BigDecimal y = new BigDecimal(i).multiply(new BigDecimal(0.1)).setScale(0,BigDecimal.ROUND_DOWN);
			if (x.compareTo(new BigDecimal(A)) == 0 && y.compareTo(new BigDecimal(B)) == 0) {
				ans = i;
			}
		} BigDecimal x = new BigDecimal(i).multiply(new BigDecimal(0.08)).setScale(0,BigDecimal.ROUND_DOWN); x new BigDecimal(i).multiply(new BigDecimal(0.08)).setScale(0,BigDecimal.ROUND_DOWN) new BigDecimal(i).multiply(new BigDecimal(0.08)).setScale new BigDecimal(i).multiply(new BigDecimal(0.08)) new BigDecimal(i).multiply new BigDecimal(i) new BigDecimal(0.08) 0 BigDecimal.ROUND_DOWN BigDecimal BigDecimal.ROUND_DOWN BigDecimal y = new BigDecimal(i).multiply(new BigDecimal(0.1)).setScale(0,BigDecimal.ROUND_DOWN); y new BigDecimal(i).multiply(new BigDecimal(0.1)).setScale(0,BigDecimal.ROUND_DOWN) new BigDecimal(i).multiply(new BigDecimal(0.1)).setScale new BigDecimal(i).multiply(new BigDecimal(0.1)) new BigDecimal(i).multiply new BigDecimal(i) new BigDecimal(0.1) 0 BigDecimal.ROUND_DOWN BigDecimal BigDecimal.ROUND_DOWN if (x.compareTo(new BigDecimal(A)) == 0 && y.compareTo(new BigDecimal(B)) == 0) {
				ans = i;
			} x.compareTo(new BigDecimal(A)) == 0 && y.compareTo(new BigDecimal(B)) == 0 x.compareTo(new BigDecimal(A)) == 0 x.compareTo(new BigDecimal(A)) x.compareTo x new BigDecimal(A) 0 y.compareTo(new BigDecimal(B)) == 0 y.compareTo(new BigDecimal(B)) y.compareTo y new BigDecimal(B) 0 {
				ans = i;
			} ans = i ans i System.out.println(ans) System.out.println System.out System System.out ans String[] args args // ユークリッドの控除法(最大公約数を求める)
	private static long gcd(long a, long b) {
		if (b == 0) {
			return a;
		}
		return gcd(b, a % b);
	} gcd {
		if (b == 0) {
			return a;
		}
		return gcd(b, a % b);
	} if (b == 0) {
			return a;
		} b == 0 b 0 {
			return a;
		} return a; a return gcd(b, a % b); gcd(b, a % b) gcd b a % b a b long a a long b b // 複数の最大公約数を求める
	private static long gcdex(long param[]) {
		long g = gcd(param[0], param[1]);
		for (int i = 1; i < param.length-1; i++) {
			g = gcd(g, param[i+1]);
		}
		return g;
	} gcdex {
		long g = gcd(param[0], param[1]);
		for (int i = 1; i < param.length-1; i++) {
			g = gcd(g, param[i+1]);
		}
		return g;
	} long g = gcd(param[0], param[1]); g gcd(param[0], param[1]) gcd param[0] param 0 param[1] param 1 for (int i = 1; i < param.length-1; i++) {
			g = gcd(g, param[i+1]);
		} int i = 1; int i = 1; i 1 i < param.length-1 i param.length-1 param.length param param.length 1 i++ i++ i {
			g = gcd(g, param[i+1]);
		} {
			g = gcd(g, param[i+1]);
		} g = gcd(g, param[i+1]) g gcd(g, param[i+1]) gcd g param[i+1] param i+1 i 1 return g; g long param[] param // 最小公倍数を求める
	private static long lcm(long a, long b) {
		return (a * b) / gcd(a, b);
	} lcm {
		return (a * b) / gcd(a, b);
	} return (a * b) / gcd(a, b); (a * b) / gcd(a, b) (a * b) a b gcd(a, b) gcd a b long a a long b b //
	private static long all(long n, long count, int N) {
		if (count == N) {
			return count;
		}
		return all(1, count, N);
	} all {
		if (count == N) {
			return count;
		}
		return all(1, count, N);
	} if (count == N) {
			return count;
		} count == N count N {
			return count;
		} return count; count return all(1, count, N); all(1, count, N) all 1 count N long n n long count count int N N public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		// 入力
		int A = sc.nextInt();
		int B = sc.nextInt();
		BigDecimal a = new BigDecimal(A).divide(new BigDecimal(0.08),0,RoundingMode.UP);
		BigDecimal b = new BigDecimal(B).divide(new BigDecimal(0.1),0,RoundingMode.UP);
//		double a = A / 0.08;
//		double b = B / 0.1;
		BigDecimal min = a.compareTo(b) == -1 ? a : b; 
		BigDecimal max = a.compareTo(b) == -1 ? b : a; 
//		BigDecimal min = a < b ? new BigDecimal(a) : new BigDecimal(b); 
//		BigDecimal max = a < b ? new BigDecimal(b) : new BigDecimal(a); 
		
		int ans = -1;
		for (int i = min.intValue(); i <= max.intValue(); i++) {
			BigDecimal x = new BigDecimal(i).multiply(new BigDecimal(0.08)).setScale(0,BigDecimal.ROUND_DOWN);
			BigDecimal y = new BigDecimal(i).multiply(new BigDecimal(0.1)).setScale(0,BigDecimal.ROUND_DOWN);
			if (x.compareTo(new BigDecimal(A)) == 0 && y.compareTo(new BigDecimal(B)) == 0) {
				ans = i;
			}
		}
		System.out.println(ans);			
	}

	
	// ユークリッドの控除法(最大公約数を求める)
	private static long gcd(long a, long b) {
		if (b == 0) {
			return a;
		}
		return gcd(b, a % b);
	}

	// 複数の最大公約数を求める
	private static long gcdex(long param[]) {
		long g = gcd(param[0], param[1]);
		for (int i = 1; i < param.length-1; i++) {
			g = gcd(g, param[i+1]);
		}
		return g;
	}

	// 最小公倍数を求める
	private static long lcm(long a, long b) {
		return (a * b) / gcd(a, b);
	}

	//
	private static long all(long n, long count, int N) {
		if (count == N) {
			return count;
		}
		return all(1, count, N);
	}

} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		// 入力
		int A = sc.nextInt();
		int B = sc.nextInt();
		BigDecimal a = new BigDecimal(A).divide(new BigDecimal(0.08),0,RoundingMode.UP);
		BigDecimal b = new BigDecimal(B).divide(new BigDecimal(0.1),0,RoundingMode.UP);
//		double a = A / 0.08;
//		double b = B / 0.1;
		BigDecimal min = a.compareTo(b) == -1 ? a : b; 
		BigDecimal max = a.compareTo(b) == -1 ? b : a; 
//		BigDecimal min = a < b ? new BigDecimal(a) : new BigDecimal(b); 
//		BigDecimal max = a < b ? new BigDecimal(b) : new BigDecimal(a); 
		
		int ans = -1;
		for (int i = min.intValue(); i <= max.intValue(); i++) {
			BigDecimal x = new BigDecimal(i).multiply(new BigDecimal(0.08)).setScale(0,BigDecimal.ROUND_DOWN);
			BigDecimal y = new BigDecimal(i).multiply(new BigDecimal(0.1)).setScale(0,BigDecimal.ROUND_DOWN);
			if (x.compareTo(new BigDecimal(A)) == 0 && y.compareTo(new BigDecimal(B)) == 0) {
				ans = i;
			}
		}
		System.out.println(ans);			
	}

	
	// ユークリッドの控除法(最大公約数を求める)
	private static long gcd(long a, long b) {
		if (b == 0) {
			return a;
		}
		return gcd(b, a % b);
	}

	// 複数の最大公約数を求める
	private static long gcdex(long param[]) {
		long g = gcd(param[0], param[1]);
		for (int i = 1; i < param.length-1; i++) {
			g = gcd(g, param[i+1]);
		}
		return g;
	}

	// 最小公倍数を求める
	private static long lcm(long a, long b) {
		return (a * b) / gcd(a, b);
	}

	//
	private static long all(long n, long count, int N) {
		if (count == N) {
			return count;
		}
		return all(1, count, N);
	}

} Main
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.*;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		// 入力
		int A = sc.nextInt();
		int B = sc.nextInt();
		BigDecimal a = new BigDecimal(A).divide(new BigDecimal(0.08),0,RoundingMode.UP);
		BigDecimal b = new BigDecimal(B).divide(new BigDecimal(0.1),0,RoundingMode.UP);
//		double a = A / 0.08;
//		double b = B / 0.1;
		BigDecimal min = a.compareTo(b) == -1 ? a : b; 
		BigDecimal max = a.compareTo(b) == -1 ? b : a; 
//		BigDecimal min = a < b ? new BigDecimal(a) : new BigDecimal(b); 
//		BigDecimal max = a < b ? new BigDecimal(b) : new BigDecimal(a); 
		
		int ans = -1;
		for (int i = min.intValue(); i <= max.intValue(); i++) {
			BigDecimal x = new BigDecimal(i).multiply(new BigDecimal(0.08)).setScale(0,BigDecimal.ROUND_DOWN);
			BigDecimal y = new BigDecimal(i).multiply(new BigDecimal(0.1)).setScale(0,BigDecimal.ROUND_DOWN);
			if (x.compareTo(new BigDecimal(A)) == 0 && y.compareTo(new BigDecimal(B)) == 0) {
				ans = i;
			}
		}
		System.out.println(ans);			
	}

	
	// ユークリッドの控除法(最大公約数を求める)
	private static long gcd(long a, long b) {
		if (b == 0) {
			return a;
		}
		return gcd(b, a % b);
	}

	// 複数の最大公約数を求める
	private static long gcdex(long param[]) {
		long g = gcd(param[0], param[1]);
		for (int i = 1; i < param.length-1; i++) {
			g = gcd(g, param[i+1]);
		}
		return g;
	}

	// 最小公倍数を求める
	private static long lcm(long a, long b) {
		return (a * b) / gcd(a, b);
	}

	//
	private static long all(long n, long count, int N) {
		if (count == N) {
			return count;
		}
		return all(1, count, N);
	}

}