import java.math.BigDecimal;
import java.util.Scanner;


public class Main {

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

		int A = sc.nextInt();
		int B = sc.nextInt();

		BigDecimal tax08 = BigDecimal.valueOf(0.08);
		BigDecimal tax10 = BigDecimal.valueOf(0.10);
		BigDecimal taxA = new BigDecimal(0);
		BigDecimal taxB = new BigDecimal(0);

		int result = -1;
		for(int i = 1; i < 10000; i++) {
			taxA = BigDecimal.valueOf(i);
			taxB = BigDecimal.valueOf(i);
			taxA = taxA.multiply(tax08);
			taxB = taxB.multiply(tax10);

			taxA = taxA.setScale(0, BigDecimal.ROUND_DOWN);
			taxB = taxB.setScale(0, BigDecimal.ROUND_DOWN);

			if(BigDecimal.valueOf(A).equals(taxA)
				&& BigDecimal.valueOf(B).equals(taxB)) {
				result = i;
				break;
			}
		}

		System.out.println(result);

	}

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

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

		int A = sc.nextInt();
		int B = sc.nextInt();

		BigDecimal tax08 = BigDecimal.valueOf(0.08);
		BigDecimal tax10 = BigDecimal.valueOf(0.10);
		BigDecimal taxA = new BigDecimal(0);
		BigDecimal taxB = new BigDecimal(0);

		int result = -1;
		for(int i = 1; i < 10000; i++) {
			taxA = BigDecimal.valueOf(i);
			taxB = BigDecimal.valueOf(i);
			taxA = taxA.multiply(tax08);
			taxB = taxB.multiply(tax10);

			taxA = taxA.setScale(0, BigDecimal.ROUND_DOWN);
			taxB = taxB.setScale(0, BigDecimal.ROUND_DOWN);

			if(BigDecimal.valueOf(A).equals(taxA)
				&& BigDecimal.valueOf(B).equals(taxB)) {
				result = i;
				break;
			}
		}

		System.out.println(result);

	}

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

		int A = sc.nextInt();
		int B = sc.nextInt();

		BigDecimal tax08 = BigDecimal.valueOf(0.08);
		BigDecimal tax10 = BigDecimal.valueOf(0.10);
		BigDecimal taxA = new BigDecimal(0);
		BigDecimal taxB = new BigDecimal(0);

		int result = -1;
		for(int i = 1; i < 10000; i++) {
			taxA = BigDecimal.valueOf(i);
			taxB = BigDecimal.valueOf(i);
			taxA = taxA.multiply(tax08);
			taxB = taxB.multiply(tax10);

			taxA = taxA.setScale(0, BigDecimal.ROUND_DOWN);
			taxB = taxB.setScale(0, BigDecimal.ROUND_DOWN);

			if(BigDecimal.valueOf(A).equals(taxA)
				&& BigDecimal.valueOf(B).equals(taxB)) {
				result = i;
				break;
			}
		}

		System.out.println(result);

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

		int A = sc.nextInt();
		int B = sc.nextInt();

		BigDecimal tax08 = BigDecimal.valueOf(0.08);
		BigDecimal tax10 = BigDecimal.valueOf(0.10);
		BigDecimal taxA = new BigDecimal(0);
		BigDecimal taxB = new BigDecimal(0);

		int result = -1;
		for(int i = 1; i < 10000; i++) {
			taxA = BigDecimal.valueOf(i);
			taxB = BigDecimal.valueOf(i);
			taxA = taxA.multiply(tax08);
			taxB = taxB.multiply(tax10);

			taxA = taxA.setScale(0, BigDecimal.ROUND_DOWN);
			taxB = taxB.setScale(0, BigDecimal.ROUND_DOWN);

			if(BigDecimal.valueOf(A).equals(taxA)
				&& BigDecimal.valueOf(B).equals(taxB)) {
				result = i;
				break;
			}
		}

		System.out.println(result);

	} 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 BigDecimal tax08 = BigDecimal.valueOf(0.08); tax08 BigDecimal.valueOf(0.08) BigDecimal.valueOf BigDecimal 0.08 BigDecimal tax10 = BigDecimal.valueOf(0.10); tax10 BigDecimal.valueOf(0.10) BigDecimal.valueOf BigDecimal 0.10 BigDecimal taxA = new BigDecimal(0); taxA new BigDecimal(0) BigDecimal taxB = new BigDecimal(0); taxB new BigDecimal(0) int result = -1; result -1 1 for(int i = 1; i < 10000; i++) {
			taxA = BigDecimal.valueOf(i);
			taxB = BigDecimal.valueOf(i);
			taxA = taxA.multiply(tax08);
			taxB = taxB.multiply(tax10);

			taxA = taxA.setScale(0, BigDecimal.ROUND_DOWN);
			taxB = taxB.setScale(0, BigDecimal.ROUND_DOWN);

			if(BigDecimal.valueOf(A).equals(taxA)
				&& BigDecimal.valueOf(B).equals(taxB)) {
				result = i;
				break;
			}
		} int i = 1; int i = 1; i 1 i < 10000 i 10000 i++ i++ i {
			taxA = BigDecimal.valueOf(i);
			taxB = BigDecimal.valueOf(i);
			taxA = taxA.multiply(tax08);
			taxB = taxB.multiply(tax10);

			taxA = taxA.setScale(0, BigDecimal.ROUND_DOWN);
			taxB = taxB.setScale(0, BigDecimal.ROUND_DOWN);

			if(BigDecimal.valueOf(A).equals(taxA)
				&& BigDecimal.valueOf(B).equals(taxB)) {
				result = i;
				break;
			}
		} {
			taxA = BigDecimal.valueOf(i);
			taxB = BigDecimal.valueOf(i);
			taxA = taxA.multiply(tax08);
			taxB = taxB.multiply(tax10);

			taxA = taxA.setScale(0, BigDecimal.ROUND_DOWN);
			taxB = taxB.setScale(0, BigDecimal.ROUND_DOWN);

			if(BigDecimal.valueOf(A).equals(taxA)
				&& BigDecimal.valueOf(B).equals(taxB)) {
				result = i;
				break;
			}
		} taxA = BigDecimal.valueOf(i) taxA BigDecimal.valueOf(i) BigDecimal.valueOf BigDecimal i taxB = BigDecimal.valueOf(i) taxB BigDecimal.valueOf(i) BigDecimal.valueOf BigDecimal i taxA = taxA.multiply(tax08) taxA taxA.multiply(tax08) taxA.multiply taxA tax08 taxB = taxB.multiply(tax10) taxB taxB.multiply(tax10) taxB.multiply taxB tax10 taxA = taxA.setScale(0, BigDecimal.ROUND_DOWN) taxA taxA.setScale(0, BigDecimal.ROUND_DOWN) taxA.setScale taxA 0 BigDecimal.ROUND_DOWN BigDecimal BigDecimal.ROUND_DOWN taxB = taxB.setScale(0, BigDecimal.ROUND_DOWN) taxB taxB.setScale(0, BigDecimal.ROUND_DOWN) taxB.setScale taxB 0 BigDecimal.ROUND_DOWN BigDecimal BigDecimal.ROUND_DOWN if(BigDecimal.valueOf(A).equals(taxA)
				&& BigDecimal.valueOf(B).equals(taxB)) {
				result = i;
				break;
			} BigDecimal.valueOf(A).equals(taxA)
				&& BigDecimal.valueOf(B).equals(taxB) BigDecimal.valueOf(A).equals(taxA) BigDecimal.valueOf(A).equals BigDecimal.valueOf(A) BigDecimal.valueOf BigDecimal A taxA BigDecimal.valueOf(B).equals(taxB) BigDecimal.valueOf(B).equals BigDecimal.valueOf(B) BigDecimal.valueOf BigDecimal B taxB {
				result = i;
				break;
			} result = i result i break; System.out.println(result) System.out.println System.out System System.out result String[] args args public class Main {

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

		int A = sc.nextInt();
		int B = sc.nextInt();

		BigDecimal tax08 = BigDecimal.valueOf(0.08);
		BigDecimal tax10 = BigDecimal.valueOf(0.10);
		BigDecimal taxA = new BigDecimal(0);
		BigDecimal taxB = new BigDecimal(0);

		int result = -1;
		for(int i = 1; i < 10000; i++) {
			taxA = BigDecimal.valueOf(i);
			taxB = BigDecimal.valueOf(i);
			taxA = taxA.multiply(tax08);
			taxB = taxB.multiply(tax10);

			taxA = taxA.setScale(0, BigDecimal.ROUND_DOWN);
			taxB = taxB.setScale(0, BigDecimal.ROUND_DOWN);

			if(BigDecimal.valueOf(A).equals(taxA)
				&& BigDecimal.valueOf(B).equals(taxB)) {
				result = i;
				break;
			}
		}

		System.out.println(result);

	}

} public class Main {

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

		int A = sc.nextInt();
		int B = sc.nextInt();

		BigDecimal tax08 = BigDecimal.valueOf(0.08);
		BigDecimal tax10 = BigDecimal.valueOf(0.10);
		BigDecimal taxA = new BigDecimal(0);
		BigDecimal taxB = new BigDecimal(0);

		int result = -1;
		for(int i = 1; i < 10000; i++) {
			taxA = BigDecimal.valueOf(i);
			taxB = BigDecimal.valueOf(i);
			taxA = taxA.multiply(tax08);
			taxB = taxB.multiply(tax10);

			taxA = taxA.setScale(0, BigDecimal.ROUND_DOWN);
			taxB = taxB.setScale(0, BigDecimal.ROUND_DOWN);

			if(BigDecimal.valueOf(A).equals(taxA)
				&& BigDecimal.valueOf(B).equals(taxB)) {
				result = i;
				break;
			}
		}

		System.out.println(result);

	}

} Main
import java.math.BigDecimal;
import java.util.Scanner;


public class Main {

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

		int A = sc.nextInt();
		int B = sc.nextInt();

		BigDecimal tax08 = BigDecimal.valueOf(0.08);
		BigDecimal tax10 = BigDecimal.valueOf(0.10);
		BigDecimal taxA = new BigDecimal(0);
		BigDecimal taxB = new BigDecimal(0);

		int result = -1;
		for(int i = 1; i < 10000; i++) {
			taxA = BigDecimal.valueOf(i);
			taxB = BigDecimal.valueOf(i);
			taxA = taxA.multiply(tax08);
			taxB = taxB.multiply(tax10);

			taxA = taxA.setScale(0, BigDecimal.ROUND_DOWN);
			taxB = taxB.setScale(0, BigDecimal.ROUND_DOWN);

			if(BigDecimal.valueOf(A).equals(taxA)
				&& BigDecimal.valueOf(B).equals(taxB)) {
				result = i;
				break;
			}
		}

		System.out.println(result);

	}

}
