import java.io.FileNotFoundException;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) throws FileNotFoundException {

		//    	File file = new File("src/in.txt");
		//    	Scanner sc = new Scanner(file);

		Scanner sc = new Scanner(System.in);

		int A = sc.nextInt();
		int B = sc.nextInt();
		boolean flg = false;
		for (int i = 1; i < 1269; 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.io.FileNotFoundException; FileNotFoundException java.io import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) throws FileNotFoundException {

		//    	File file = new File("src/in.txt");
		//    	Scanner sc = new Scanner(file);

		Scanner sc = new Scanner(System.in);

		int A = sc.nextInt();
		int B = sc.nextInt();
		boolean flg = false;
		for (int i = 1; i < 1269; 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) throws FileNotFoundException {

		//    	File file = new File("src/in.txt");
		//    	Scanner sc = new Scanner(file);

		Scanner sc = new Scanner(System.in);

		int A = sc.nextInt();
		int B = sc.nextInt();
		boolean flg = false;
		for (int i = 1; i < 1269; 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 {

		//    	File file = new File("src/in.txt");
		//    	Scanner sc = new Scanner(file);

		Scanner sc = new Scanner(System.in);

		int A = sc.nextInt();
		int B = sc.nextInt();
		boolean flg = false;
		for (int i = 1; i < 1269; 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 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 boolean flg = false; flg false for (int i = 1; i < 1269; 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 < 1269 i 1269 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" String[] args args public class Main {
	public static void main(String[] args) throws FileNotFoundException {

		//    	File file = new File("src/in.txt");
		//    	Scanner sc = new Scanner(file);

		Scanner sc = new Scanner(System.in);

		int A = sc.nextInt();
		int B = sc.nextInt();
		boolean flg = false;
		for (int i = 1; i < 1269; 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) throws FileNotFoundException {

		//    	File file = new File("src/in.txt");
		//    	Scanner sc = new Scanner(file);

		Scanner sc = new Scanner(System.in);

		int A = sc.nextInt();
		int B = sc.nextInt();
		boolean flg = false;
		for (int i = 1; i < 1269; 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.io.FileNotFoundException;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) throws FileNotFoundException {

		//    	File file = new File("src/in.txt");
		//    	Scanner sc = new Scanner(file);

		Scanner sc = new Scanner(System.in);

		int A = sc.nextInt();
		int B = sc.nextInt();
		boolean flg = false;
		for (int i = 1; i < 1269; 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");
		}
	}
}