import java.util.*;

class Main {
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int a = in.nextInt();
		int b = in.nextInt();
		int result = -1;

		for(int i=1; i<=1250; i++){
			if(Math.floor(i*0.08)==a && Math.floor(i*0.1)==b){
				result = i;
				break;
			}
		}
		System.out.println(result);

	}
} import java.util.*; util.* java class Main {
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int a = in.nextInt();
		int b = in.nextInt();
		int result = -1;

		for(int i=1; i<=1250; i++){
			if(Math.floor(i*0.08)==a && Math.floor(i*0.1)==b){
				result = i;
				break;
			}
		}
		System.out.println(result);

	}
} Main public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int a = in.nextInt();
		int b = in.nextInt();
		int result = -1;

		for(int i=1; i<=1250; i++){
			if(Math.floor(i*0.08)==a && Math.floor(i*0.1)==b){
				result = i;
				break;
			}
		}
		System.out.println(result);

	} main {
		Scanner in = new Scanner(System.in);
		int a = in.nextInt();
		int b = in.nextInt();
		int result = -1;

		for(int i=1; i<=1250; i++){
			if(Math.floor(i*0.08)==a && Math.floor(i*0.1)==b){
				result = i;
				break;
			}
		}
		System.out.println(result);

	} Scanner in = new Scanner(System.in); in new Scanner(System.in) int a = in.nextInt(); a in.nextInt() in.nextInt in int b = in.nextInt(); b in.nextInt() in.nextInt in int result = -1; result -1 1 for(int i=1; i<=1250; i++){
			if(Math.floor(i*0.08)==a && Math.floor(i*0.1)==b){
				result = i;
				break;
			}
		} int i=1; int i=1; i 1 i<=1250 i 1250 i++ i++ i {
			if(Math.floor(i*0.08)==a && Math.floor(i*0.1)==b){
				result = i;
				break;
			}
		} {
			if(Math.floor(i*0.08)==a && Math.floor(i*0.1)==b){
				result = i;
				break;
			}
		} if(Math.floor(i*0.08)==a && Math.floor(i*0.1)==b){
				result = i;
				break;
			} Math.floor(i*0.08)==a && Math.floor(i*0.1)==b Math.floor(i*0.08)==a Math.floor(i*0.08) Math.floor Math i*0.08 i 0.08 a Math.floor(i*0.1)==b Math.floor(i*0.1) Math.floor Math i*0.1 i 0.1 b {
				result = i;
				break;
			} result = i result i break; System.out.println(result) System.out.println System.out System System.out result String[] args args
import java.util.*;

class Main {
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int a = in.nextInt();
		int b = in.nextInt();
		int result = -1;

		for(int i=1; i<=1250; i++){
			if(Math.floor(i*0.08)==a && Math.floor(i*0.1)==b){
				result = i;
				break;
			}
		}
		System.out.println(result);

	}
}
