import java.util.Scanner;
public class Main {

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);

		int a = scan.nextInt();
		int b = scan.nextInt();
		int min = 0;

		for(int i =1;i<=1009;i++) {
			if((int)(i*0.08) == a && (int)(i*0.1) == b) {
				min = i;
				break;
			}else {
				min = -1;
			}
		}

		System.out.println(min);

		scan.close();

	}

} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);

		int a = scan.nextInt();
		int b = scan.nextInt();
		int min = 0;

		for(int i =1;i<=1009;i++) {
			if((int)(i*0.08) == a && (int)(i*0.1) == b) {
				min = i;
				break;
			}else {
				min = -1;
			}
		}

		System.out.println(min);

		scan.close();

	}

} Main public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);

		int a = scan.nextInt();
		int b = scan.nextInt();
		int min = 0;

		for(int i =1;i<=1009;i++) {
			if((int)(i*0.08) == a && (int)(i*0.1) == b) {
				min = i;
				break;
			}else {
				min = -1;
			}
		}

		System.out.println(min);

		scan.close();

	} main {

		Scanner scan = new Scanner(System.in);

		int a = scan.nextInt();
		int b = scan.nextInt();
		int min = 0;

		for(int i =1;i<=1009;i++) {
			if((int)(i*0.08) == a && (int)(i*0.1) == b) {
				min = i;
				break;
			}else {
				min = -1;
			}
		}

		System.out.println(min);

		scan.close();

	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int a = scan.nextInt(); a scan.nextInt() scan.nextInt scan int b = scan.nextInt(); b scan.nextInt() scan.nextInt scan int min = 0; min 0 for(int i =1;i<=1009;i++) {
			if((int)(i*0.08) == a && (int)(i*0.1) == b) {
				min = i;
				break;
			}else {
				min = -1;
			}
		} int i =1; int i =1; i 1 i<=1009 i 1009 i++ i++ i {
			if((int)(i*0.08) == a && (int)(i*0.1) == b) {
				min = i;
				break;
			}else {
				min = -1;
			}
		} {
			if((int)(i*0.08) == a && (int)(i*0.1) == b) {
				min = i;
				break;
			}else {
				min = -1;
			}
		} if((int)(i*0.08) == a && (int)(i*0.1) == b) {
				min = i;
				break;
			}else {
				min = -1;
			} (int)(i*0.08) == a && (int)(i*0.1) == b (int)(i*0.08) == a (int)(i*0.08) i 0.08 a (int)(i*0.1) == b (int)(i*0.1) i 0.1 b {
				min = i;
				break;
			} min = i min i break; {
				min = -1;
			} min = -1 min -1 1 System.out.println(min) System.out.println System.out System System.out min scan.close() scan.close scan String[] args args public class Main {

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);

		int a = scan.nextInt();
		int b = scan.nextInt();
		int min = 0;

		for(int i =1;i<=1009;i++) {
			if((int)(i*0.08) == a && (int)(i*0.1) == b) {
				min = i;
				break;
			}else {
				min = -1;
			}
		}

		System.out.println(min);

		scan.close();

	}

} public class Main {

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);

		int a = scan.nextInt();
		int b = scan.nextInt();
		int min = 0;

		for(int i =1;i<=1009;i++) {
			if((int)(i*0.08) == a && (int)(i*0.1) == b) {
				min = i;
				break;
			}else {
				min = -1;
			}
		}

		System.out.println(min);

		scan.close();

	}

} Main
import java.util.Scanner;
public class Main {

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);

		int a = scan.nextInt();
		int b = scan.nextInt();
		int min = 0;

		for(int i =1;i<=1009;i++) {
			if((int)(i*0.08) == a && (int)(i*0.1) == b) {
				min = i;
				break;
			}else {
				min = -1;
			}
		}

		System.out.println(min);

		scan.close();

	}

}
