import java.util.Scanner;

class Main {
	public static void main(String[] $) {
		Scanner sc = new Scanner(System.in);
		int a=sc.nextInt(),b=sc.nextInt(),res=-1;
		
		for(int i=1;i<=1000;i++) {
			if((int)(i*0.08)==a && (int)(i*0.1)==b) {
				res=i;
				break;
			}
		}
		System.out.println(res);
	}
} import java.util.Scanner; Scanner java.util class Main {
	public static void main(String[] $) {
		Scanner sc = new Scanner(System.in);
		int a=sc.nextInt(),b=sc.nextInt(),res=-1;
		
		for(int i=1;i<=1000;i++) {
			if((int)(i*0.08)==a && (int)(i*0.1)==b) {
				res=i;
				break;
			}
		}
		System.out.println(res);
	}
} Main public static void main(String[] $) {
		Scanner sc = new Scanner(System.in);
		int a=sc.nextInt(),b=sc.nextInt(),res=-1;
		
		for(int i=1;i<=1000;i++) {
			if((int)(i*0.08)==a && (int)(i*0.1)==b) {
				res=i;
				break;
			}
		}
		System.out.println(res);
	} main {
		Scanner sc = new Scanner(System.in);
		int a=sc.nextInt(),b=sc.nextInt(),res=-1;
		
		for(int i=1;i<=1000;i++) {
			if((int)(i*0.08)==a && (int)(i*0.1)==b) {
				res=i;
				break;
			}
		}
		System.out.println(res);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int a=sc.nextInt() a sc.nextInt() sc.nextInt sc b=sc.nextInt() b sc.nextInt() sc.nextInt sc res=-1; res -1 1 for(int i=1;i<=1000;i++) {
			if((int)(i*0.08)==a && (int)(i*0.1)==b) {
				res=i;
				break;
			}
		} int i=1; int i=1; i 1 i<=1000 i 1000 i++ i++ i {
			if((int)(i*0.08)==a && (int)(i*0.1)==b) {
				res=i;
				break;
			}
		} {
			if((int)(i*0.08)==a && (int)(i*0.1)==b) {
				res=i;
				break;
			}
		} if((int)(i*0.08)==a && (int)(i*0.1)==b) {
				res=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 {
				res=i;
				break;
			} res=i res i break; System.out.println(res) System.out.println System.out System System.out res String[] $ $
import java.util.Scanner;

class Main {
	public static void main(String[] $) {
		Scanner sc = new Scanner(System.in);
		int a=sc.nextInt(),b=sc.nextInt(),res=-1;
		
		for(int i=1;i<=1000;i++) {
			if((int)(i*0.08)==a && (int)(i*0.1)==b) {
				res=i;
				break;
			}
		}
		System.out.println(res);
	}
}
