import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		int B = sc.nextInt();
		sc.close();
		for(int i = 1; i <= 1009; i++) {
			int a = (int)(i * 0.08);
			int b = (int)(i * 0.10);
			if(a == A && b == B) {
				System.out.println(i);
				return;
			}
		}
		System.out.println(-1);
	}
} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		int B = sc.nextInt();
		sc.close();
		for(int i = 1; i <= 1009; i++) {
			int a = (int)(i * 0.08);
			int b = (int)(i * 0.10);
			if(a == A && b == B) {
				System.out.println(i);
				return;
			}
		}
		System.out.println(-1);
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		int B = sc.nextInt();
		sc.close();
		for(int i = 1; i <= 1009; i++) {
			int a = (int)(i * 0.08);
			int b = (int)(i * 0.10);
			if(a == A && b == B) {
				System.out.println(i);
				return;
			}
		}
		System.out.println(-1);
	} main {
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		int B = sc.nextInt();
		sc.close();
		for(int i = 1; i <= 1009; i++) {
			int a = (int)(i * 0.08);
			int b = (int)(i * 0.10);
			if(a == A && b == B) {
				System.out.println(i);
				return;
			}
		}
		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 sc.close() sc.close sc for(int i = 1; i <= 1009; i++) {
			int a = (int)(i * 0.08);
			int b = (int)(i * 0.10);
			if(a == A && b == B) {
				System.out.println(i);
				return;
			}
		} int i = 1; int i = 1; i 1 i <= 1009 i 1009 i++ i++ i {
			int a = (int)(i * 0.08);
			int b = (int)(i * 0.10);
			if(a == A && b == B) {
				System.out.println(i);
				return;
			}
		} {
			int a = (int)(i * 0.08);
			int b = (int)(i * 0.10);
			if(a == A && b == B) {
				System.out.println(i);
				return;
			}
		} int a = (int)(i * 0.08); a (int)(i * 0.08) i 0.08 int b = (int)(i * 0.10); b (int)(i * 0.10) i 0.10 if(a == A && b == B) {
				System.out.println(i);
				return;
			} a == A && b == B a == A a A b == B b B {
				System.out.println(i);
				return;
			} System.out.println(i) System.out.println System.out System System.out i return; 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 sc = new Scanner(System.in);
		int A = sc.nextInt();
		int B = sc.nextInt();
		sc.close();
		for(int i = 1; i <= 1009; i++) {
			int a = (int)(i * 0.08);
			int b = (int)(i * 0.10);
			if(a == A && b == B) {
				System.out.println(i);
				return;
			}
		}
		System.out.println(-1);
	}
} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		int B = sc.nextInt();
		sc.close();
		for(int i = 1; i <= 1009; i++) {
			int a = (int)(i * 0.08);
			int b = (int)(i * 0.10);
			if(a == A && b == B) {
				System.out.println(i);
				return;
			}
		}
		System.out.println(-1);
	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		int B = sc.nextInt();
		sc.close();
		for(int i = 1; i <= 1009; i++) {
			int a = (int)(i * 0.08);
			int b = (int)(i * 0.10);
			if(a == A && b == B) {
				System.out.println(i);
				return;
			}
		}
		System.out.println(-1);
	}
}