import java.util.*;
import java.lang.Math;

public class Main {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int A = in.nextInt();
		int B = in.nextInt();
		
		int number1 = (int) Math.ceil(A/0.08);
		int number2 = (int) Math.ceil(B/0.1);
		
		if(number1 > number2) {
			if (Math.floor(number1*0.1) == B) {
				System.out.println(number1);
			} else {
				System.out.println("-1");
			}
		} else if (number2 > number1) {
			if (Math.floor(number2*0.08) == A) {
				System.out.println(number2);
			} else {
				System.out.println("-1");
			}
		} else {
			System.out.println(number1);
		}
		
	}
} import java.util.*; util.* java import java.lang.Math; Math java.lang public class Main {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int A = in.nextInt();
		int B = in.nextInt();
		
		int number1 = (int) Math.ceil(A/0.08);
		int number2 = (int) Math.ceil(B/0.1);
		
		if(number1 > number2) {
			if (Math.floor(number1*0.1) == B) {
				System.out.println(number1);
			} else {
				System.out.println("-1");
			}
		} else if (number2 > number1) {
			if (Math.floor(number2*0.08) == A) {
				System.out.println(number2);
			} else {
				System.out.println("-1");
			}
		} else {
			System.out.println(number1);
		}
		
	}
} Main public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int A = in.nextInt();
		int B = in.nextInt();
		
		int number1 = (int) Math.ceil(A/0.08);
		int number2 = (int) Math.ceil(B/0.1);
		
		if(number1 > number2) {
			if (Math.floor(number1*0.1) == B) {
				System.out.println(number1);
			} else {
				System.out.println("-1");
			}
		} else if (number2 > number1) {
			if (Math.floor(number2*0.08) == A) {
				System.out.println(number2);
			} else {
				System.out.println("-1");
			}
		} else {
			System.out.println(number1);
		}
		
	} main {
		Scanner in = new Scanner(System.in);
		int A = in.nextInt();
		int B = in.nextInt();
		
		int number1 = (int) Math.ceil(A/0.08);
		int number2 = (int) Math.ceil(B/0.1);
		
		if(number1 > number2) {
			if (Math.floor(number1*0.1) == B) {
				System.out.println(number1);
			} else {
				System.out.println("-1");
			}
		} else if (number2 > number1) {
			if (Math.floor(number2*0.08) == A) {
				System.out.println(number2);
			} else {
				System.out.println("-1");
			}
		} else {
			System.out.println(number1);
		}
		
	} Scanner in = new Scanner(System.in); in new Scanner(System.in) int A = in.nextInt(); A in.nextInt() in.nextInt in int B = in.nextInt(); B in.nextInt() in.nextInt in int number1 = (int) Math.ceil(A/0.08); number1 (int) Math.ceil(A/0.08) Math.ceil Math A/0.08 A 0.08 int number2 = (int) Math.ceil(B/0.1); number2 (int) Math.ceil(B/0.1) Math.ceil Math B/0.1 B 0.1 if(number1 > number2) {
			if (Math.floor(number1*0.1) == B) {
				System.out.println(number1);
			} else {
				System.out.println("-1");
			}
		} else if (number2 > number1) {
			if (Math.floor(number2*0.08) == A) {
				System.out.println(number2);
			} else {
				System.out.println("-1");
			}
		} else {
			System.out.println(number1);
		} number1 > number2 number1 number2 {
			if (Math.floor(number1*0.1) == B) {
				System.out.println(number1);
			} else {
				System.out.println("-1");
			}
		} if (Math.floor(number1*0.1) == B) {
				System.out.println(number1);
			} else {
				System.out.println("-1");
			} Math.floor(number1*0.1) == B Math.floor(number1*0.1) Math.floor Math number1*0.1 number1 0.1 B {
				System.out.println(number1);
			} System.out.println(number1) System.out.println System.out System System.out number1 {
				System.out.println("-1");
			} System.out.println("-1") System.out.println System.out System System.out "-1" if (number2 > number1) {
			if (Math.floor(number2*0.08) == A) {
				System.out.println(number2);
			} else {
				System.out.println("-1");
			}
		} else {
			System.out.println(number1);
		} number2 > number1 number2 number1 {
			if (Math.floor(number2*0.08) == A) {
				System.out.println(number2);
			} else {
				System.out.println("-1");
			}
		} if (Math.floor(number2*0.08) == A) {
				System.out.println(number2);
			} else {
				System.out.println("-1");
			} Math.floor(number2*0.08) == A Math.floor(number2*0.08) Math.floor Math number2*0.08 number2 0.08 A {
				System.out.println(number2);
			} System.out.println(number2) System.out.println System.out System System.out number2 {
				System.out.println("-1");
			} System.out.println("-1") System.out.println System.out System System.out "-1" {
			System.out.println(number1);
		} System.out.println(number1) System.out.println System.out System System.out number1 String[] args args public class Main {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int A = in.nextInt();
		int B = in.nextInt();
		
		int number1 = (int) Math.ceil(A/0.08);
		int number2 = (int) Math.ceil(B/0.1);
		
		if(number1 > number2) {
			if (Math.floor(number1*0.1) == B) {
				System.out.println(number1);
			} else {
				System.out.println("-1");
			}
		} else if (number2 > number1) {
			if (Math.floor(number2*0.08) == A) {
				System.out.println(number2);
			} else {
				System.out.println("-1");
			}
		} else {
			System.out.println(number1);
		}
		
	}
} public class Main {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int A = in.nextInt();
		int B = in.nextInt();
		
		int number1 = (int) Math.ceil(A/0.08);
		int number2 = (int) Math.ceil(B/0.1);
		
		if(number1 > number2) {
			if (Math.floor(number1*0.1) == B) {
				System.out.println(number1);
			} else {
				System.out.println("-1");
			}
		} else if (number2 > number1) {
			if (Math.floor(number2*0.08) == A) {
				System.out.println(number2);
			} else {
				System.out.println("-1");
			}
		} else {
			System.out.println(number1);
		}
		
	}
} Main
import java.util.*;
import java.lang.Math;

public class Main {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int A = in.nextInt();
		int B = in.nextInt();
		
		int number1 = (int) Math.ceil(A/0.08);
		int number2 = (int) Math.ceil(B/0.1);
		
		if(number1 > number2) {
			if (Math.floor(number1*0.1) == B) {
				System.out.println(number1);
			} else {
				System.out.println("-1");
			}
		} else if (number2 > number1) {
			if (Math.floor(number2*0.08) == A) {
				System.out.println(number2);
			} else {
				System.out.println("-1");
			}
		} else {
			System.out.println(number1);
		}
		
	}
}
