import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scanner = new Scanner(System.in);
		int a = scanner.nextInt();
		int b = scanner.nextInt();

		float ansA = (float)(a / 0.08f);
		float ansB = (float)(b / 0.1f);

		int aa = ansA % 1 == 0 ? (int)ansA : (int)ansA +1;
		int bb = ansB % 1 == 0 ? (int)ansB : (int)ansB +1;

		int c = Math.max(aa, bb);

		Boolean isOK = true;
		if((int)(c * 0.08f) != a){
			isOK = false;
		}
		if((int)(c * 0.1f) != b){
			isOK = false;
		}

		int ans = isOK ? c : -1;
		System.out.println(ans);

	}

} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scanner = new Scanner(System.in);
		int a = scanner.nextInt();
		int b = scanner.nextInt();

		float ansA = (float)(a / 0.08f);
		float ansB = (float)(b / 0.1f);

		int aa = ansA % 1 == 0 ? (int)ansA : (int)ansA +1;
		int bb = ansB % 1 == 0 ? (int)ansB : (int)ansB +1;

		int c = Math.max(aa, bb);

		Boolean isOK = true;
		if((int)(c * 0.08f) != a){
			isOK = false;
		}
		if((int)(c * 0.1f) != b){
			isOK = false;
		}

		int ans = isOK ? c : -1;
		System.out.println(ans);

	}

} Main public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scanner = new Scanner(System.in);
		int a = scanner.nextInt();
		int b = scanner.nextInt();

		float ansA = (float)(a / 0.08f);
		float ansB = (float)(b / 0.1f);

		int aa = ansA % 1 == 0 ? (int)ansA : (int)ansA +1;
		int bb = ansB % 1 == 0 ? (int)ansB : (int)ansB +1;

		int c = Math.max(aa, bb);

		Boolean isOK = true;
		if((int)(c * 0.08f) != a){
			isOK = false;
		}
		if((int)(c * 0.1f) != b){
			isOK = false;
		}

		int ans = isOK ? c : -1;
		System.out.println(ans);

	} main {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scanner = new Scanner(System.in);
		int a = scanner.nextInt();
		int b = scanner.nextInt();

		float ansA = (float)(a / 0.08f);
		float ansB = (float)(b / 0.1f);

		int aa = ansA % 1 == 0 ? (int)ansA : (int)ansA +1;
		int bb = ansB % 1 == 0 ? (int)ansB : (int)ansB +1;

		int c = Math.max(aa, bb);

		Boolean isOK = true;
		if((int)(c * 0.08f) != a){
			isOK = false;
		}
		if((int)(c * 0.1f) != b){
			isOK = false;
		}

		int ans = isOK ? c : -1;
		System.out.println(ans);

	} Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int a = scanner.nextInt(); a scanner.nextInt() scanner.nextInt scanner int b = scanner.nextInt(); b scanner.nextInt() scanner.nextInt scanner float ansA = (float)(a / 0.08f); ansA (float)(a / 0.08f) a 0.08f float ansB = (float)(b / 0.1f); ansB (float)(b / 0.1f) b 0.1f int aa = ansA % 1 == 0 ? (int)ansA : (int)ansA +1; aa ansA % 1 == 0 ? (int)ansA : (int)ansA +1 ansA % 1 == 0 ansA % 1 ansA 1 0 (int)ansA (int)ansA +1 (int)ansA 1 int bb = ansB % 1 == 0 ? (int)ansB : (int)ansB +1; bb ansB % 1 == 0 ? (int)ansB : (int)ansB +1 ansB % 1 == 0 ansB % 1 ansB 1 0 (int)ansB (int)ansB +1 (int)ansB 1 int c = Math.max(aa, bb); c Math.max(aa, bb) Math.max Math aa bb Boolean isOK = true; isOK true if((int)(c * 0.08f) != a){
			isOK = false;
		} (int)(c * 0.08f) != a (int)(c * 0.08f) c 0.08f a {
			isOK = false;
		} isOK = false isOK false if((int)(c * 0.1f) != b){
			isOK = false;
		} (int)(c * 0.1f) != b (int)(c * 0.1f) c 0.1f b {
			isOK = false;
		} isOK = false isOK false int ans = isOK ? c : -1; ans isOK ? c : -1 isOK c -1 1 System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scanner = new Scanner(System.in);
		int a = scanner.nextInt();
		int b = scanner.nextInt();

		float ansA = (float)(a / 0.08f);
		float ansB = (float)(b / 0.1f);

		int aa = ansA % 1 == 0 ? (int)ansA : (int)ansA +1;
		int bb = ansB % 1 == 0 ? (int)ansB : (int)ansB +1;

		int c = Math.max(aa, bb);

		Boolean isOK = true;
		if((int)(c * 0.08f) != a){
			isOK = false;
		}
		if((int)(c * 0.1f) != b){
			isOK = false;
		}

		int ans = isOK ? c : -1;
		System.out.println(ans);

	}

} public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scanner = new Scanner(System.in);
		int a = scanner.nextInt();
		int b = scanner.nextInt();

		float ansA = (float)(a / 0.08f);
		float ansB = (float)(b / 0.1f);

		int aa = ansA % 1 == 0 ? (int)ansA : (int)ansA +1;
		int bb = ansB % 1 == 0 ? (int)ansB : (int)ansB +1;

		int c = Math.max(aa, bb);

		Boolean isOK = true;
		if((int)(c * 0.08f) != a){
			isOK = false;
		}
		if((int)(c * 0.1f) != b){
			isOK = false;
		}

		int ans = isOK ? c : -1;
		System.out.println(ans);

	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scanner = new Scanner(System.in);
		int a = scanner.nextInt();
		int b = scanner.nextInt();

		float ansA = (float)(a / 0.08f);
		float ansB = (float)(b / 0.1f);

		int aa = ansA % 1 == 0 ? (int)ansA : (int)ansA +1;
		int bb = ansB % 1 == 0 ? (int)ansB : (int)ansB +1;

		int c = Math.max(aa, bb);

		Boolean isOK = true;
		if((int)(c * 0.08f) != a){
			isOK = false;
		}
		if((int)(c * 0.1f) != b){
			isOK = false;
		}

		int ans = isOK ? c : -1;
		System.out.println(ans);

	}

}
