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();
		int s = -1;
		for(int i=1; i<=1009; i++) {
			if((int)(i*0.08)==A && (int)(i*0.1)==B) {
				s = i;
				break;
			}
		}
		System.out.println(s);
	}

} 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();
		int s = -1;
		for(int i=1; i<=1009; i++) {
			if((int)(i*0.08)==A && (int)(i*0.1)==B) {
				s = i;
				break;
			}
		}
		System.out.println(s);
	}

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

} 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();
		int s = -1;
		for(int i=1; i<=1009; i++) {
			if((int)(i*0.08)==A && (int)(i*0.1)==B) {
				s = i;
				break;
			}
		}
		System.out.println(s);
	}

} 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();
		int s = -1;
		for(int i=1; i<=1009; i++) {
			if((int)(i*0.08)==A && (int)(i*0.1)==B) {
				s = i;
				break;
			}
		}
		System.out.println(s);
	}

}