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

public class Main {
	public static void main(String[] args) throws IOException{
		InputStreamReader in = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(in);
		String[] line = br.readLine().split(" ");
		int a = Integer.parseInt(line[0]);
		int b = Integer.parseInt(line[1]);
		
		br.close();

		float price;
		
		for(int i = 0;i<10000;i++) {
			if((int)(i*0.08) == a && (int)(i*0.10) == b) {
				System.out.println(i);
				return;
			}
		}
		System.out.println(-1);
	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {
	public static void main(String[] args) throws IOException{
		InputStreamReader in = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(in);
		String[] line = br.readLine().split(" ");
		int a = Integer.parseInt(line[0]);
		int b = Integer.parseInt(line[1]);
		
		br.close();

		float price;
		
		for(int i = 0;i<10000;i++) {
			if((int)(i*0.08) == a && (int)(i*0.10) == b) {
				System.out.println(i);
				return;
			}
		}
		System.out.println(-1);
	}
} Main public static void main(String[] args) throws IOException{
		InputStreamReader in = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(in);
		String[] line = br.readLine().split(" ");
		int a = Integer.parseInt(line[0]);
		int b = Integer.parseInt(line[1]);
		
		br.close();

		float price;
		
		for(int i = 0;i<10000;i++) {
			if((int)(i*0.08) == a && (int)(i*0.10) == b) {
				System.out.println(i);
				return;
			}
		}
		System.out.println(-1);
	} main {
		InputStreamReader in = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(in);
		String[] line = br.readLine().split(" ");
		int a = Integer.parseInt(line[0]);
		int b = Integer.parseInt(line[1]);
		
		br.close();

		float price;
		
		for(int i = 0;i<10000;i++) {
			if((int)(i*0.08) == a && (int)(i*0.10) == b) {
				System.out.println(i);
				return;
			}
		}
		System.out.println(-1);
	} InputStreamReader in = new InputStreamReader(System.in); in new InputStreamReader(System.in) BufferedReader br = new BufferedReader(in); br new BufferedReader(in) String[] line = br.readLine().split(" "); line br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " int a = Integer.parseInt(line[0]); a Integer.parseInt(line[0]) Integer.parseInt Integer line[0] line 0 int b = Integer.parseInt(line[1]); b Integer.parseInt(line[1]) Integer.parseInt Integer line[1] line 1 br.close() br.close br float price; price for(int i = 0;i<10000;i++) {
			if((int)(i*0.08) == a && (int)(i*0.10) == b) {
				System.out.println(i);
				return;
			}
		} int i = 0; int i = 0; i 0 i<10000 i 10000 i++ i++ i {
			if((int)(i*0.08) == a && (int)(i*0.10) == b) {
				System.out.println(i);
				return;
			}
		} {
			if((int)(i*0.08) == a && (int)(i*0.10) == b) {
				System.out.println(i);
				return;
			}
		} if((int)(i*0.08) == a && (int)(i*0.10) == b) {
				System.out.println(i);
				return;
			} (int)(i*0.08) == a && (int)(i*0.10) == b (int)(i*0.08) == a (int)(i*0.08) i 0.08 a (int)(i*0.10) == b (int)(i*0.10) i 0.10 b {
				System.out.println(i);
				return;
			} System.out.println(i) System.out.println System.out System System.out i return; System.out.println(-1) System.out.println System.out System System.out -1 1 String[] args args public class Main {
	public static void main(String[] args) throws IOException{
		InputStreamReader in = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(in);
		String[] line = br.readLine().split(" ");
		int a = Integer.parseInt(line[0]);
		int b = Integer.parseInt(line[1]);
		
		br.close();

		float price;
		
		for(int i = 0;i<10000;i++) {
			if((int)(i*0.08) == a && (int)(i*0.10) == b) {
				System.out.println(i);
				return;
			}
		}
		System.out.println(-1);
	}
} public class Main {
	public static void main(String[] args) throws IOException{
		InputStreamReader in = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(in);
		String[] line = br.readLine().split(" ");
		int a = Integer.parseInt(line[0]);
		int b = Integer.parseInt(line[1]);
		
		br.close();

		float price;
		
		for(int i = 0;i<10000;i++) {
			if((int)(i*0.08) == a && (int)(i*0.10) == b) {
				System.out.println(i);
				return;
			}
		}
		System.out.println(-1);
	}
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {
	public static void main(String[] args) throws IOException{
		InputStreamReader in = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(in);
		String[] line = br.readLine().split(" ");
		int a = Integer.parseInt(line[0]);
		int b = Integer.parseInt(line[1]);
		
		br.close();

		float price;
		
		for(int i = 0;i<10000;i++) {
			if((int)(i*0.08) == a && (int)(i*0.10) == b) {
				System.out.println(i);
				return;
			}
		}
		System.out.println(-1);
	}
}
