import java.util.Scanner;

public class Main {
	
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

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

		int ans = -1;
		for (int i=0; i<10; i++) {
			int x = B*10 + i;
			if (x * 8 / 100 == A) {
				ans = x;
				break;
			}
		}
		
		System.out.println(ans);
	}
} import java.util.Scanner; Scanner java.util public class Main {
	
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

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

		int ans = -1;
		for (int i=0; i<10; i++) {
			int x = B*10 + i;
			if (x * 8 / 100 == A) {
				ans = x;
				break;
			}
		}
		
		System.out.println(ans);
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

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

		int ans = -1;
		for (int i=0; i<10; i++) {
			int x = B*10 + i;
			if (x * 8 / 100 == A) {
				ans = x;
				break;
			}
		}
		
		System.out.println(ans);
	} main {
		Scanner sc = new Scanner(System.in);

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

		int ans = -1;
		for (int i=0; i<10; i++) {
			int x = B*10 + i;
			if (x * 8 / 100 == A) {
				ans = x;
				break;
			}
		}
		
		System.out.println(ans);
	} 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 int ans = -1; ans -1 1 for (int i=0; i<10; i++) {
			int x = B*10 + i;
			if (x * 8 / 100 == A) {
				ans = x;
				break;
			}
		} int i=0; int i=0; i 0 i<10 i 10 i++ i++ i {
			int x = B*10 + i;
			if (x * 8 / 100 == A) {
				ans = x;
				break;
			}
		} {
			int x = B*10 + i;
			if (x * 8 / 100 == A) {
				ans = x;
				break;
			}
		} int x = B*10 + i; x B*10 + i B*10 B 10 i if (x * 8 / 100 == A) {
				ans = x;
				break;
			} x * 8 / 100 == A x * 8 / 100 x * 8 x 8 100 A {
				ans = x;
				break;
			} ans = x ans x break; 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) {
		Scanner sc = new Scanner(System.in);

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

		int ans = -1;
		for (int i=0; i<10; i++) {
			int x = B*10 + i;
			if (x * 8 / 100 == A) {
				ans = x;
				break;
			}
		}
		
		System.out.println(ans);
	}
} public class Main {
	
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

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

		int ans = -1;
		for (int i=0; i<10; i++) {
			int x = B*10 + i;
			if (x * 8 / 100 == A) {
				ans = x;
				break;
			}
		}
		
		System.out.println(ans);
	}
} Main
import java.util.Scanner;

public class Main {
	
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

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

		int ans = -1;
		for (int i=0; i<10; i++) {
			int x = B*10 + i;
			if (x * 8 / 100 == A) {
				ans = x;
				break;
			}
		}
		
		System.out.println(ans);
	}
}