import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = getInt(sc);
		int b = getInt(sc);

		int answer=1;
		while(true) {
			int tax8=answer*8/100;
			int tax10=answer*10/100;

			if(tax8==a&&tax10==b) {
				System.out.println(answer);
				break;
			}else if(tax8>a&&tax10>b) {
				System.out.println(-1);
				break;
			}
			answer++;

		}


	}

	/**
	 * *汎用メソッド <br>
	 * スキャナーからの入力値をlongで返却
	 *
	 * @return
	 */
	public static long getLong(Scanner sc) {

		return Long.parseLong(sc.next());
	}

	/**
	 * *汎用メソッド <br>
	 * スキャナーからの入力値をintで返却
	 *
	 * @return
	 */
	public static int getInt(Scanner sc) {

		return Integer.parseInt(sc.next());
	}

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

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = getInt(sc);
		int b = getInt(sc);

		int answer=1;
		while(true) {
			int tax8=answer*8/100;
			int tax10=answer*10/100;

			if(tax8==a&&tax10==b) {
				System.out.println(answer);
				break;
			}else if(tax8>a&&tax10>b) {
				System.out.println(-1);
				break;
			}
			answer++;

		}


	}

	/**
	 * *汎用メソッド <br>
	 * スキャナーからの入力値をlongで返却
	 *
	 * @return
	 */
	public static long getLong(Scanner sc) {

		return Long.parseLong(sc.next());
	}

	/**
	 * *汎用メソッド <br>
	 * スキャナーからの入力値をintで返却
	 *
	 * @return
	 */
	public static int getInt(Scanner sc) {

		return Integer.parseInt(sc.next());
	}

} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = getInt(sc);
		int b = getInt(sc);

		int answer=1;
		while(true) {
			int tax8=answer*8/100;
			int tax10=answer*10/100;

			if(tax8==a&&tax10==b) {
				System.out.println(answer);
				break;
			}else if(tax8>a&&tax10>b) {
				System.out.println(-1);
				break;
			}
			answer++;

		}


	} main {
		Scanner sc = new Scanner(System.in);
		int a = getInt(sc);
		int b = getInt(sc);

		int answer=1;
		while(true) {
			int tax8=answer*8/100;
			int tax10=answer*10/100;

			if(tax8==a&&tax10==b) {
				System.out.println(answer);
				break;
			}else if(tax8>a&&tax10>b) {
				System.out.println(-1);
				break;
			}
			answer++;

		}


	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int a = getInt(sc); a getInt(sc) getInt sc int b = getInt(sc); b getInt(sc) getInt sc int answer=1; answer 1 while(true) {
			int tax8=answer*8/100;
			int tax10=answer*10/100;

			if(tax8==a&&tax10==b) {
				System.out.println(answer);
				break;
			}else if(tax8>a&&tax10>b) {
				System.out.println(-1);
				break;
			}
			answer++;

		} true {
			int tax8=answer*8/100;
			int tax10=answer*10/100;

			if(tax8==a&&tax10==b) {
				System.out.println(answer);
				break;
			}else if(tax8>a&&tax10>b) {
				System.out.println(-1);
				break;
			}
			answer++;

		} int tax8=answer*8/100; tax8 answer*8/100 answer*8 answer 8 100 int tax10=answer*10/100; tax10 answer*10/100 answer*10 answer 10 100 if(tax8==a&&tax10==b) {
				System.out.println(answer);
				break;
			}else if(tax8>a&&tax10>b) {
				System.out.println(-1);
				break;
			} tax8==a&&tax10==b tax8==a tax8 a tax10==b tax10 b {
				System.out.println(answer);
				break;
			} System.out.println(answer) System.out.println System.out System System.out answer break; if(tax8>a&&tax10>b) {
				System.out.println(-1);
				break;
			} tax8>a&&tax10>b tax8>a tax8 a tax10>b tax10 b {
				System.out.println(-1);
				break;
			} System.out.println(-1) System.out.println System.out System System.out -1 1 break; answer++ answer String[] args args /**
	 * *汎用メソッド <br>
	 * スキャナーからの入力値をlongで返却
	 *
	 * @return
	 */
	public static long getLong(Scanner sc) {

		return Long.parseLong(sc.next());
	} getLong {

		return Long.parseLong(sc.next());
	} return Long.parseLong(sc.next()); Long.parseLong(sc.next()) Long.parseLong Long sc.next() sc.next sc Scanner sc sc /**
	 * *汎用メソッド <br>
	 * スキャナーからの入力値をintで返却
	 *
	 * @return
	 */
	public static int getInt(Scanner sc) {

		return Integer.parseInt(sc.next());
	} getInt {

		return Integer.parseInt(sc.next());
	} return Integer.parseInt(sc.next()); Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc Scanner sc sc public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = getInt(sc);
		int b = getInt(sc);

		int answer=1;
		while(true) {
			int tax8=answer*8/100;
			int tax10=answer*10/100;

			if(tax8==a&&tax10==b) {
				System.out.println(answer);
				break;
			}else if(tax8>a&&tax10>b) {
				System.out.println(-1);
				break;
			}
			answer++;

		}


	}

	/**
	 * *汎用メソッド <br>
	 * スキャナーからの入力値をlongで返却
	 *
	 * @return
	 */
	public static long getLong(Scanner sc) {

		return Long.parseLong(sc.next());
	}

	/**
	 * *汎用メソッド <br>
	 * スキャナーからの入力値をintで返却
	 *
	 * @return
	 */
	public static int getInt(Scanner sc) {

		return Integer.parseInt(sc.next());
	}

} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = getInt(sc);
		int b = getInt(sc);

		int answer=1;
		while(true) {
			int tax8=answer*8/100;
			int tax10=answer*10/100;

			if(tax8==a&&tax10==b) {
				System.out.println(answer);
				break;
			}else if(tax8>a&&tax10>b) {
				System.out.println(-1);
				break;
			}
			answer++;

		}


	}

	/**
	 * *汎用メソッド <br>
	 * スキャナーからの入力値をlongで返却
	 *
	 * @return
	 */
	public static long getLong(Scanner sc) {

		return Long.parseLong(sc.next());
	}

	/**
	 * *汎用メソッド <br>
	 * スキャナーからの入力値をintで返却
	 *
	 * @return
	 */
	public static int getInt(Scanner sc) {

		return Integer.parseInt(sc.next());
	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = getInt(sc);
		int b = getInt(sc);

		int answer=1;
		while(true) {
			int tax8=answer*8/100;
			int tax10=answer*10/100;

			if(tax8==a&&tax10==b) {
				System.out.println(answer);
				break;
			}else if(tax8>a&&tax10>b) {
				System.out.println(-1);
				break;
			}
			answer++;

		}


	}

	/**
	 * *汎用メソッド <br>
	 * スキャナーからの入力値をlongで返却
	 *
	 * @return
	 */
	public static long getLong(Scanner sc) {

		return Long.parseLong(sc.next());
	}

	/**
	 * *汎用メソッド <br>
	 * スキャナーからの入力値をintで返却
	 *
	 * @return
	 */
	public static int getInt(Scanner sc) {

		return Integer.parseInt(sc.next());
	}

}
