import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		//List<String> list=new ArrayList<String>(Arrays.asList(s.split("")));
		//List<Integer> list=new ArrayList<Integer>();
		//int[] array = new int[1000000000*2];
		int a = sc.nextInt();
		int b = sc.nextInt();
		//System.out.println((int)Math.floor(1.5));
		for (int i=1;100000000>i;i++) {
			double c = i*0.08;
			//System.out.println((int)c);
			if((int)Math.floor(c)== a) {
				double d = i*0.1;
				if((int)Math.floor(d)== b) {
					System.out.println(i);
					System.exit(0);
				}
			}
		}
		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);
		//List<String> list=new ArrayList<String>(Arrays.asList(s.split("")));
		//List<Integer> list=new ArrayList<Integer>();
		//int[] array = new int[1000000000*2];
		int a = sc.nextInt();
		int b = sc.nextInt();
		//System.out.println((int)Math.floor(1.5));
		for (int i=1;100000000>i;i++) {
			double c = i*0.08;
			//System.out.println((int)c);
			if((int)Math.floor(c)== a) {
				double d = i*0.1;
				if((int)Math.floor(d)== b) {
					System.out.println(i);
					System.exit(0);
				}
			}
		}
		System.out.println("-1");
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		//List<String> list=new ArrayList<String>(Arrays.asList(s.split("")));
		//List<Integer> list=new ArrayList<Integer>();
		//int[] array = new int[1000000000*2];
		int a = sc.nextInt();
		int b = sc.nextInt();
		//System.out.println((int)Math.floor(1.5));
		for (int i=1;100000000>i;i++) {
			double c = i*0.08;
			//System.out.println((int)c);
			if((int)Math.floor(c)== a) {
				double d = i*0.1;
				if((int)Math.floor(d)== b) {
					System.out.println(i);
					System.exit(0);
				}
			}
		}
		System.out.println("-1");
	} main {
		Scanner sc = new Scanner(System.in);
		//List<String> list=new ArrayList<String>(Arrays.asList(s.split("")));
		//List<Integer> list=new ArrayList<Integer>();
		//int[] array = new int[1000000000*2];
		int a = sc.nextInt();
		int b = sc.nextInt();
		//System.out.println((int)Math.floor(1.5));
		for (int i=1;100000000>i;i++) {
			double c = i*0.08;
			//System.out.println((int)c);
			if((int)Math.floor(c)== a) {
				double d = i*0.1;
				if((int)Math.floor(d)== b) {
					System.out.println(i);
					System.exit(0);
				}
			}
		}
		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 for (int i=1;100000000>i;i++) {
			double c = i*0.08;
			//System.out.println((int)c);
			if((int)Math.floor(c)== a) {
				double d = i*0.1;
				if((int)Math.floor(d)== b) {
					System.out.println(i);
					System.exit(0);
				}
			}
		} int i=1; int i=1; i 1 100000000>i 100000000 i i++ i++ i {
			double c = i*0.08;
			//System.out.println((int)c);
			if((int)Math.floor(c)== a) {
				double d = i*0.1;
				if((int)Math.floor(d)== b) {
					System.out.println(i);
					System.exit(0);
				}
			}
		} {
			double c = i*0.08;
			//System.out.println((int)c);
			if((int)Math.floor(c)== a) {
				double d = i*0.1;
				if((int)Math.floor(d)== b) {
					System.out.println(i);
					System.exit(0);
				}
			}
		} double c = i*0.08; c i*0.08 i 0.08 if((int)Math.floor(c)== a) {
				double d = i*0.1;
				if((int)Math.floor(d)== b) {
					System.out.println(i);
					System.exit(0);
				}
			} (int)Math.floor(c)== a (int)Math.floor(c) Math.floor Math c a {
				double d = i*0.1;
				if((int)Math.floor(d)== b) {
					System.out.println(i);
					System.exit(0);
				}
			} double d = i*0.1; d i*0.1 i 0.1 if((int)Math.floor(d)== b) {
					System.out.println(i);
					System.exit(0);
				} (int)Math.floor(d)== b (int)Math.floor(d) Math.floor Math d b {
					System.out.println(i);
					System.exit(0);
				} System.out.println(i) System.out.println System.out System System.out i System.exit(0) System.exit System 0 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) {
		Scanner sc = new Scanner(System.in);
		//List<String> list=new ArrayList<String>(Arrays.asList(s.split("")));
		//List<Integer> list=new ArrayList<Integer>();
		//int[] array = new int[1000000000*2];
		int a = sc.nextInt();
		int b = sc.nextInt();
		//System.out.println((int)Math.floor(1.5));
		for (int i=1;100000000>i;i++) {
			double c = i*0.08;
			//System.out.println((int)c);
			if((int)Math.floor(c)== a) {
				double d = i*0.1;
				if((int)Math.floor(d)== b) {
					System.out.println(i);
					System.exit(0);
				}
			}
		}
		System.out.println("-1");
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		//List<String> list=new ArrayList<String>(Arrays.asList(s.split("")));
		//List<Integer> list=new ArrayList<Integer>();
		//int[] array = new int[1000000000*2];
		int a = sc.nextInt();
		int b = sc.nextInt();
		//System.out.println((int)Math.floor(1.5));
		for (int i=1;100000000>i;i++) {
			double c = i*0.08;
			//System.out.println((int)c);
			if((int)Math.floor(c)== a) {
				double d = i*0.1;
				if((int)Math.floor(d)== b) {
					System.out.println(i);
					System.exit(0);
				}
			}
		}
		System.out.println("-1");
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		//List<String> list=new ArrayList<String>(Arrays.asList(s.split("")));
		//List<Integer> list=new ArrayList<Integer>();
		//int[] array = new int[1000000000*2];
		int a = sc.nextInt();
		int b = sc.nextInt();
		//System.out.println((int)Math.floor(1.5));
		for (int i=1;100000000>i;i++) {
			double c = i*0.08;
			//System.out.println((int)c);
			if((int)Math.floor(c)== a) {
				double d = i*0.1;
				if((int)Math.floor(d)== b) {
					System.out.println(i);
					System.exit(0);
				}
			}
		}
		System.out.println("-1");
	}
}