import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {

	static int[] S ;
	public static void main(String[] args) throws Exception {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		String W = in.readLine();

		String[] Ws = W.split(" ");
		long[] A = new long[Ws.length];
		for (int i = 0; i < Ws.length; i++) {
			A[i] = Long.parseLong(Ws[i]);
		}

		long ans = 1;
		for(;ans<=1000;ans++){
			if(Math.floor(ans * 0.08) == A[0] && Math.floor(ans * 0.1) == A[1]){
				break;
			}
		}
		if(ans == 1001){
			ans = -1;
		}
		System.out.println(ans);
	}


} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {

	static int[] S ;
	public static void main(String[] args) throws Exception {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		String W = in.readLine();

		String[] Ws = W.split(" ");
		long[] A = new long[Ws.length];
		for (int i = 0; i < Ws.length; i++) {
			A[i] = Long.parseLong(Ws[i]);
		}

		long ans = 1;
		for(;ans<=1000;ans++){
			if(Math.floor(ans * 0.08) == A[0] && Math.floor(ans * 0.1) == A[1]){
				break;
			}
		}
		if(ans == 1001){
			ans = -1;
		}
		System.out.println(ans);
	}


} Main static int[] S ; S public static void main(String[] args) throws Exception {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		String W = in.readLine();

		String[] Ws = W.split(" ");
		long[] A = new long[Ws.length];
		for (int i = 0; i < Ws.length; i++) {
			A[i] = Long.parseLong(Ws[i]);
		}

		long ans = 1;
		for(;ans<=1000;ans++){
			if(Math.floor(ans * 0.08) == A[0] && Math.floor(ans * 0.1) == A[1]){
				break;
			}
		}
		if(ans == 1001){
			ans = -1;
		}
		System.out.println(ans);
	} main {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		String W = in.readLine();

		String[] Ws = W.split(" ");
		long[] A = new long[Ws.length];
		for (int i = 0; i < Ws.length; i++) {
			A[i] = Long.parseLong(Ws[i]);
		}

		long ans = 1;
		for(;ans<=1000;ans++){
			if(Math.floor(ans * 0.08) == A[0] && Math.floor(ans * 0.1) == A[1]){
				break;
			}
		}
		if(ans == 1001){
			ans = -1;
		}
		System.out.println(ans);
	} BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); in new BufferedReader(new InputStreamReader(System.in)) String W = in.readLine(); W in.readLine() in.readLine in String[] Ws = W.split(" "); Ws W.split(" ") W.split W " " long[] A = new long[Ws.length]; A new long[Ws.length] Ws.length Ws Ws.length for (int i = 0; i < Ws.length; i++) {
			A[i] = Long.parseLong(Ws[i]);
		} int i = 0; int i = 0; i 0 i < Ws.length i Ws.length Ws Ws.length i++ i++ i {
			A[i] = Long.parseLong(Ws[i]);
		} {
			A[i] = Long.parseLong(Ws[i]);
		} A[i] = Long.parseLong(Ws[i]) A[i] A i Long.parseLong(Ws[i]) Long.parseLong Long Ws[i] Ws i long ans = 1; ans 1 for(;ans<=1000;ans++){
			if(Math.floor(ans * 0.08) == A[0] && Math.floor(ans * 0.1) == A[1]){
				break;
			}
		} ; ans<=1000 ans 1000 ans++ ans++ ans {
			if(Math.floor(ans * 0.08) == A[0] && Math.floor(ans * 0.1) == A[1]){
				break;
			}
		} {
			if(Math.floor(ans * 0.08) == A[0] && Math.floor(ans * 0.1) == A[1]){
				break;
			}
		} if(Math.floor(ans * 0.08) == A[0] && Math.floor(ans * 0.1) == A[1]){
				break;
			} Math.floor(ans * 0.08) == A[0] && Math.floor(ans * 0.1) == A[1] Math.floor(ans * 0.08) == A[0] Math.floor(ans * 0.08) Math.floor Math ans * 0.08 ans 0.08 A[0] A 0 Math.floor(ans * 0.1) == A[1] Math.floor(ans * 0.1) Math.floor Math ans * 0.1 ans 0.1 A[1] A 1 {
				break;
			} break; if(ans == 1001){
			ans = -1;
		} ans == 1001 ans 1001 {
			ans = -1;
		} ans = -1 ans -1 1 System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {

	static int[] S ;
	public static void main(String[] args) throws Exception {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		String W = in.readLine();

		String[] Ws = W.split(" ");
		long[] A = new long[Ws.length];
		for (int i = 0; i < Ws.length; i++) {
			A[i] = Long.parseLong(Ws[i]);
		}

		long ans = 1;
		for(;ans<=1000;ans++){
			if(Math.floor(ans * 0.08) == A[0] && Math.floor(ans * 0.1) == A[1]){
				break;
			}
		}
		if(ans == 1001){
			ans = -1;
		}
		System.out.println(ans);
	}


} public class Main {

	static int[] S ;
	public static void main(String[] args) throws Exception {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		String W = in.readLine();

		String[] Ws = W.split(" ");
		long[] A = new long[Ws.length];
		for (int i = 0; i < Ws.length; i++) {
			A[i] = Long.parseLong(Ws[i]);
		}

		long ans = 1;
		for(;ans<=1000;ans++){
			if(Math.floor(ans * 0.08) == A[0] && Math.floor(ans * 0.1) == A[1]){
				break;
			}
		}
		if(ans == 1001){
			ans = -1;
		}
		System.out.println(ans);
	}


} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {

	static int[] S ;
	public static void main(String[] args) throws Exception {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		String W = in.readLine();

		String[] Ws = W.split(" ");
		long[] A = new long[Ws.length];
		for (int i = 0; i < Ws.length; i++) {
			A[i] = Long.parseLong(Ws[i]);
		}

		long ans = 1;
		for(;ans<=1000;ans++){
			if(Math.floor(ans * 0.08) == A[0] && Math.floor(ans * 0.1) == A[1]){
				break;
			}
		}
		if(ans == 1001){
			ans = -1;
		}
		System.out.println(ans);
	}


}
