import java.util.Scanner;

public class Main
{
	static public int ans100 = -1;
	static public int ans10 = -1;
	static public int ans1 = -1;
	public static void main(String[] args)
	{
		Scanner scan = new Scanner(System.in);
		String str = scan.nextLine();
		scan.close();

		String[] substr = str.split(" ", 0);
		int a = Integer.parseInt(substr[0]);
		int b = Integer.parseInt(substr[1]);

		int ans = -1;
		for (int i = 1; i< 2000; i++) {
			int aa = (int)(i * 0.08);
			int bb = (int)(i *0.1);
			if (aa == a && bb == b)  {
				ans = i;
				break;
			}
		}
		System.out.println(ans);
	}

} import java.util.Scanner; Scanner java.util public class Main
{
	static public int ans100 = -1;
	static public int ans10 = -1;
	static public int ans1 = -1;
	public static void main(String[] args)
	{
		Scanner scan = new Scanner(System.in);
		String str = scan.nextLine();
		scan.close();

		String[] substr = str.split(" ", 0);
		int a = Integer.parseInt(substr[0]);
		int b = Integer.parseInt(substr[1]);

		int ans = -1;
		for (int i = 1; i< 2000; i++) {
			int aa = (int)(i * 0.08);
			int bb = (int)(i *0.1);
			if (aa == a && bb == b)  {
				ans = i;
				break;
			}
		}
		System.out.println(ans);
	}

} Main static public int ans100 = -1; ans100 -1 1 static public int ans10 = -1; ans10 -1 1 static public int ans1 = -1; ans1 -1 1 public static void main(String[] args)
	{
		Scanner scan = new Scanner(System.in);
		String str = scan.nextLine();
		scan.close();

		String[] substr = str.split(" ", 0);
		int a = Integer.parseInt(substr[0]);
		int b = Integer.parseInt(substr[1]);

		int ans = -1;
		for (int i = 1; i< 2000; i++) {
			int aa = (int)(i * 0.08);
			int bb = (int)(i *0.1);
			if (aa == a && bb == b)  {
				ans = i;
				break;
			}
		}
		System.out.println(ans);
	} main {
		Scanner scan = new Scanner(System.in);
		String str = scan.nextLine();
		scan.close();

		String[] substr = str.split(" ", 0);
		int a = Integer.parseInt(substr[0]);
		int b = Integer.parseInt(substr[1]);

		int ans = -1;
		for (int i = 1; i< 2000; i++) {
			int aa = (int)(i * 0.08);
			int bb = (int)(i *0.1);
			if (aa == a && bb == b)  {
				ans = i;
				break;
			}
		}
		System.out.println(ans);
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) String str = scan.nextLine(); str scan.nextLine() scan.nextLine scan scan.close() scan.close scan String[] substr = str.split(" ", 0); substr str.split(" ", 0) str.split str " " 0 int a = Integer.parseInt(substr[0]); a Integer.parseInt(substr[0]) Integer.parseInt Integer substr[0] substr 0 int b = Integer.parseInt(substr[1]); b Integer.parseInt(substr[1]) Integer.parseInt Integer substr[1] substr 1 int ans = -1; ans -1 1 for (int i = 1; i< 2000; i++) {
			int aa = (int)(i * 0.08);
			int bb = (int)(i *0.1);
			if (aa == a && bb == b)  {
				ans = i;
				break;
			}
		} int i = 1; int i = 1; i 1 i< 2000 i 2000 i++ i++ i {
			int aa = (int)(i * 0.08);
			int bb = (int)(i *0.1);
			if (aa == a && bb == b)  {
				ans = i;
				break;
			}
		} {
			int aa = (int)(i * 0.08);
			int bb = (int)(i *0.1);
			if (aa == a && bb == b)  {
				ans = i;
				break;
			}
		} int aa = (int)(i * 0.08); aa (int)(i * 0.08) i 0.08 int bb = (int)(i *0.1); bb (int)(i *0.1) i 0.1 if (aa == a && bb == b)  {
				ans = i;
				break;
			} aa == a && bb == b aa == a aa a bb == b bb b {
				ans = i;
				break;
			} ans = i ans i break; System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main
{
	static public int ans100 = -1;
	static public int ans10 = -1;
	static public int ans1 = -1;
	public static void main(String[] args)
	{
		Scanner scan = new Scanner(System.in);
		String str = scan.nextLine();
		scan.close();

		String[] substr = str.split(" ", 0);
		int a = Integer.parseInt(substr[0]);
		int b = Integer.parseInt(substr[1]);

		int ans = -1;
		for (int i = 1; i< 2000; i++) {
			int aa = (int)(i * 0.08);
			int bb = (int)(i *0.1);
			if (aa == a && bb == b)  {
				ans = i;
				break;
			}
		}
		System.out.println(ans);
	}

} public class Main
{
	static public int ans100 = -1;
	static public int ans10 = -1;
	static public int ans1 = -1;
	public static void main(String[] args)
	{
		Scanner scan = new Scanner(System.in);
		String str = scan.nextLine();
		scan.close();

		String[] substr = str.split(" ", 0);
		int a = Integer.parseInt(substr[0]);
		int b = Integer.parseInt(substr[1]);

		int ans = -1;
		for (int i = 1; i< 2000; i++) {
			int aa = (int)(i * 0.08);
			int bb = (int)(i *0.1);
			if (aa == a && bb == b)  {
				ans = i;
				break;
			}
		}
		System.out.println(ans);
	}

} Main
import java.util.Scanner;

public class Main
{
	static public int ans100 = -1;
	static public int ans10 = -1;
	static public int ans1 = -1;
	public static void main(String[] args)
	{
		Scanner scan = new Scanner(System.in);
		String str = scan.nextLine();
		scan.close();

		String[] substr = str.split(" ", 0);
		int a = Integer.parseInt(substr[0]);
		int b = Integer.parseInt(substr[1]);

		int ans = -1;
		for (int i = 1; i< 2000; i++) {
			int aa = (int)(i * 0.08);
			int bb = (int)(i *0.1);
			if (aa == a && bb == b)  {
				ans = i;
				break;
			}
		}
		System.out.println(ans);
	}

}