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();

		boolean flg = false;
		for(int i = 1; i < 1010; i ++) {
			if(Math.floor(i * 0.08) == A && Math.floor(i * 0.10) == B) {
				System.out.println(i);
				flg = true;
				break;
			}
		}
		if(flg == false) {
			System.out.println(-1);
		}
	}
} 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();

		boolean flg = false;
		for(int i = 1; i < 1010; i ++) {
			if(Math.floor(i * 0.08) == A && Math.floor(i * 0.10) == B) {
				System.out.println(i);
				flg = true;
				break;
			}
		}
		if(flg == false) {
			System.out.println(-1);
		}
	}
} Main public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);

		int A = scan.nextInt();
		int B = scan.nextInt();

		boolean flg = false;
		for(int i = 1; i < 1010; i ++) {
			if(Math.floor(i * 0.08) == A && Math.floor(i * 0.10) == B) {
				System.out.println(i);
				flg = true;
				break;
			}
		}
		if(flg == false) {
			System.out.println(-1);
		}
	} main {

		Scanner scan = new Scanner(System.in);

		int A = scan.nextInt();
		int B = scan.nextInt();

		boolean flg = false;
		for(int i = 1; i < 1010; i ++) {
			if(Math.floor(i * 0.08) == A && Math.floor(i * 0.10) == B) {
				System.out.println(i);
				flg = true;
				break;
			}
		}
		if(flg == false) {
			System.out.println(-1);
		}
	} 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 boolean flg = false; flg false for(int i = 1; i < 1010; i ++) {
			if(Math.floor(i * 0.08) == A && Math.floor(i * 0.10) == B) {
				System.out.println(i);
				flg = true;
				break;
			}
		} int i = 1; int i = 1; i 1 i < 1010 i 1010 i ++ i ++ i {
			if(Math.floor(i * 0.08) == A && Math.floor(i * 0.10) == B) {
				System.out.println(i);
				flg = true;
				break;
			}
		} {
			if(Math.floor(i * 0.08) == A && Math.floor(i * 0.10) == B) {
				System.out.println(i);
				flg = true;
				break;
			}
		} if(Math.floor(i * 0.08) == A && Math.floor(i * 0.10) == B) {
				System.out.println(i);
				flg = true;
				break;
			} Math.floor(i * 0.08) == A && Math.floor(i * 0.10) == 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.10) == B Math.floor(i * 0.10) Math.floor Math i * 0.10 i 0.10 B {
				System.out.println(i);
				flg = true;
				break;
			} System.out.println(i) System.out.println System.out System System.out i flg = true flg true break; if(flg == false) {
			System.out.println(-1);
		} flg == false flg false {
			System.out.println(-1);
		} System.out.println(-1) System.out.println System.out System System.out -1 1 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();

		boolean flg = false;
		for(int i = 1; i < 1010; i ++) {
			if(Math.floor(i * 0.08) == A && Math.floor(i * 0.10) == B) {
				System.out.println(i);
				flg = true;
				break;
			}
		}
		if(flg == false) {
			System.out.println(-1);
		}
	}
} public class Main {

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);

		int A = scan.nextInt();
		int B = scan.nextInt();

		boolean flg = false;
		for(int i = 1; i < 1010; i ++) {
			if(Math.floor(i * 0.08) == A && Math.floor(i * 0.10) == B) {
				System.out.println(i);
				flg = true;
				break;
			}
		}
		if(flg == false) {
			System.out.println(-1);
		}
	}
} 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();

		boolean flg = false;
		for(int i = 1; i < 1010; i ++) {
			if(Math.floor(i * 0.08) == A && Math.floor(i * 0.10) == B) {
				System.out.println(i);
				flg = true;
				break;
			}
		}
		if(flg == false) {
			System.out.println(-1);
		}
	}
}