import java.util.*;

public class Main {
	Scanner sc = new Scanner(System.in);
	final int MOD = 1000000007;
	final int MAX = Integer.MAX_VALUE;
	final long LMAX = Long.MAX_VALUE;
	int LEN = (int)1e6 + 1;

	void doIt() {
		int A = sc.nextInt();
		int B = sc.nextInt();
		int ans = -1;
		for(int i = 0; i < 1000000; i++) {
			if((int)(i * 0.08) != A) continue;
			if((int)(i * 0.1) != B) continue;
			ans = i;
			break;
		}
		System.out.println(ans);
	}

	public static void main(String[] args) {
		new Main().doIt();
	}

} import java.util.*; util.* java public class Main {
	Scanner sc = new Scanner(System.in);
	final int MOD = 1000000007;
	final int MAX = Integer.MAX_VALUE;
	final long LMAX = Long.MAX_VALUE;
	int LEN = (int)1e6 + 1;

	void doIt() {
		int A = sc.nextInt();
		int B = sc.nextInt();
		int ans = -1;
		for(int i = 0; i < 1000000; i++) {
			if((int)(i * 0.08) != A) continue;
			if((int)(i * 0.1) != B) continue;
			ans = i;
			break;
		}
		System.out.println(ans);
	}

	public static void main(String[] args) {
		new Main().doIt();
	}

} Main Scanner sc = new Scanner(System.in); sc new Scanner(System.in) final int MOD = 1000000007; MOD 1000000007 final int MAX = Integer.MAX_VALUE; MAX Integer.MAX_VALUE Integer Integer.MAX_VALUE final long LMAX = Long.MAX_VALUE; LMAX Long.MAX_VALUE Long Long.MAX_VALUE int LEN = (int)1e6 + 1; LEN (int)1e6 + 1 (int)1e6 1 void doIt() {
		int A = sc.nextInt();
		int B = sc.nextInt();
		int ans = -1;
		for(int i = 0; i < 1000000; i++) {
			if((int)(i * 0.08) != A) continue;
			if((int)(i * 0.1) != B) continue;
			ans = i;
			break;
		}
		System.out.println(ans);
	} doIt {
		int A = sc.nextInt();
		int B = sc.nextInt();
		int ans = -1;
		for(int i = 0; i < 1000000; i++) {
			if((int)(i * 0.08) != A) continue;
			if((int)(i * 0.1) != B) continue;
			ans = i;
			break;
		}
		System.out.println(ans);
	} int A = sc.nextInt(); A sc.nextInt() sc.nextInt sc int B = sc.nextInt(); B sc.nextInt() sc.nextInt sc int ans = -1; ans -1 1 for(int i = 0; i < 1000000; i++) {
			if((int)(i * 0.08) != A) continue;
			if((int)(i * 0.1) != B) continue;
			ans = i;
			break;
		} int i = 0; int i = 0; i 0 i < 1000000 i 1000000 i++ i++ i {
			if((int)(i * 0.08) != A) continue;
			if((int)(i * 0.1) != B) continue;
			ans = i;
			break;
		} {
			if((int)(i * 0.08) != A) continue;
			if((int)(i * 0.1) != B) continue;
			ans = i;
			break;
		} if((int)(i * 0.08) != A) continue; (int)(i * 0.08) != A (int)(i * 0.08) i 0.08 A continue; if((int)(i * 0.1) != B) continue; (int)(i * 0.1) != B (int)(i * 0.1) i 0.1 B continue; ans = i ans i break; System.out.println(ans) System.out.println System.out System System.out ans public static void main(String[] args) {
		new Main().doIt();
	} main {
		new Main().doIt();
	} new Main().doIt() new Main().doIt new Main() String[] args args public class Main {
	Scanner sc = new Scanner(System.in);
	final int MOD = 1000000007;
	final int MAX = Integer.MAX_VALUE;
	final long LMAX = Long.MAX_VALUE;
	int LEN = (int)1e6 + 1;

	void doIt() {
		int A = sc.nextInt();
		int B = sc.nextInt();
		int ans = -1;
		for(int i = 0; i < 1000000; i++) {
			if((int)(i * 0.08) != A) continue;
			if((int)(i * 0.1) != B) continue;
			ans = i;
			break;
		}
		System.out.println(ans);
	}

	public static void main(String[] args) {
		new Main().doIt();
	}

} public class Main {
	Scanner sc = new Scanner(System.in);
	final int MOD = 1000000007;
	final int MAX = Integer.MAX_VALUE;
	final long LMAX = Long.MAX_VALUE;
	int LEN = (int)1e6 + 1;

	void doIt() {
		int A = sc.nextInt();
		int B = sc.nextInt();
		int ans = -1;
		for(int i = 0; i < 1000000; i++) {
			if((int)(i * 0.08) != A) continue;
			if((int)(i * 0.1) != B) continue;
			ans = i;
			break;
		}
		System.out.println(ans);
	}

	public static void main(String[] args) {
		new Main().doIt();
	}

} Main
import java.util.*;

public class Main {
	Scanner sc = new Scanner(System.in);
	final int MOD = 1000000007;
	final int MAX = Integer.MAX_VALUE;
	final long LMAX = Long.MAX_VALUE;
	int LEN = (int)1e6 + 1;

	void doIt() {
		int A = sc.nextInt();
		int B = sc.nextInt();
		int ans = -1;
		for(int i = 0; i < 1000000; i++) {
			if((int)(i * 0.08) != A) continue;
			if((int)(i * 0.1) != B) continue;
			ans = i;
			break;
		}
		System.out.println(ans);
	}

	public static void main(String[] args) {
		new Main().doIt();
	}

}
