import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
import java.lang.Math;

public class Main {
	static class FastReader{
		BufferedReader br;
		StringTokenizer st;
		public FastReader() {
			br =  new BufferedReader(new InputStreamReader(System.in));
		}
		String next() {
			while(st==null || !st.hasMoreElements()) {
				try {
					st = new StringTokenizer(br.readLine());
					
				}
				catch(IOException e) {
					e.printStackTrace();
				}
				
			}
			return st.nextToken();
		}
		int nextInt() {
			return Integer.parseInt(next());
		}
		long nextLong() {
			return Long.parseLong(next());
		}
	}
	public static void main(String[] args) {
		FastReader ob = new FastReader();
		int a =ob.nextInt(),b=ob.nextInt();
		for(int i=1;i<=10000;i++) {
			double k1=Math.floor((double)i*0.08);
			double k2=Math.floor((double)i*0.1);
			if(k1==a && k2==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 import java.util.StringTokenizer; StringTokenizer java.util import java.lang.Math; Math java.lang public class Main {
	static class FastReader{
		BufferedReader br;
		StringTokenizer st;
		public FastReader() {
			br =  new BufferedReader(new InputStreamReader(System.in));
		}
		String next() {
			while(st==null || !st.hasMoreElements()) {
				try {
					st = new StringTokenizer(br.readLine());
					
				}
				catch(IOException e) {
					e.printStackTrace();
				}
				
			}
			return st.nextToken();
		}
		int nextInt() {
			return Integer.parseInt(next());
		}
		long nextLong() {
			return Long.parseLong(next());
		}
	}
	public static void main(String[] args) {
		FastReader ob = new FastReader();
		int a =ob.nextInt(),b=ob.nextInt();
		for(int i=1;i<=10000;i++) {
			double k1=Math.floor((double)i*0.08);
			double k2=Math.floor((double)i*0.1);
			if(k1==a && k2==b) {
				System.out.println(i);
				return;
			}
			
		}
		System.out.println("-1");
	}

} Main public static void main(String[] args) {
		FastReader ob = new FastReader();
		int a =ob.nextInt(),b=ob.nextInt();
		for(int i=1;i<=10000;i++) {
			double k1=Math.floor((double)i*0.08);
			double k2=Math.floor((double)i*0.1);
			if(k1==a && k2==b) {
				System.out.println(i);
				return;
			}
			
		}
		System.out.println("-1");
	} main {
		FastReader ob = new FastReader();
		int a =ob.nextInt(),b=ob.nextInt();
		for(int i=1;i<=10000;i++) {
			double k1=Math.floor((double)i*0.08);
			double k2=Math.floor((double)i*0.1);
			if(k1==a && k2==b) {
				System.out.println(i);
				return;
			}
			
		}
		System.out.println("-1");
	} FastReader ob = new FastReader(); ob new FastReader() int a =ob.nextInt() a ob.nextInt() ob.nextInt ob b=ob.nextInt(); b ob.nextInt() ob.nextInt ob for(int i=1;i<=10000;i++) {
			double k1=Math.floor((double)i*0.08);
			double k2=Math.floor((double)i*0.1);
			if(k1==a && k2==b) {
				System.out.println(i);
				return;
			}
			
		} int i=1; int i=1; i 1 i<=10000 i 10000 i++ i++ i {
			double k1=Math.floor((double)i*0.08);
			double k2=Math.floor((double)i*0.1);
			if(k1==a && k2==b) {
				System.out.println(i);
				return;
			}
			
		} {
			double k1=Math.floor((double)i*0.08);
			double k2=Math.floor((double)i*0.1);
			if(k1==a && k2==b) {
				System.out.println(i);
				return;
			}
			
		} double k1=Math.floor((double)i*0.08); k1 Math.floor((double)i*0.08) Math.floor Math (double)i*0.08 (double)i 0.08 double k2=Math.floor((double)i*0.1); k2 Math.floor((double)i*0.1) Math.floor Math (double)i*0.1 (double)i 0.1 if(k1==a && k2==b) {
				System.out.println(i);
				return;
			} k1==a && k2==b k1==a k1 a k2==b k2 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" String[] args args static class FastReader{
		BufferedReader br;
		StringTokenizer st;
		public FastReader() {
			br =  new BufferedReader(new InputStreamReader(System.in));
		}
		String next() {
			while(st==null || !st.hasMoreElements()) {
				try {
					st = new StringTokenizer(br.readLine());
					
				}
				catch(IOException e) {
					e.printStackTrace();
				}
				
			}
			return st.nextToken();
		}
		int nextInt() {
			return Integer.parseInt(next());
		}
		long nextLong() {
			return Long.parseLong(next());
		}
	} FastReader BufferedReader br; br StringTokenizer st; st public FastReader() {
			br =  new BufferedReader(new InputStreamReader(System.in));
		} FastReader {
			br =  new BufferedReader(new InputStreamReader(System.in));
		} br =  new BufferedReader(new InputStreamReader(System.in)) br new BufferedReader(new InputStreamReader(System.in)) String next() {
			while(st==null || !st.hasMoreElements()) {
				try {
					st = new StringTokenizer(br.readLine());
					
				}
				catch(IOException e) {
					e.printStackTrace();
				}
				
			}
			return st.nextToken();
		} next {
			while(st==null || !st.hasMoreElements()) {
				try {
					st = new StringTokenizer(br.readLine());
					
				}
				catch(IOException e) {
					e.printStackTrace();
				}
				
			}
			return st.nextToken();
		} while(st==null || !st.hasMoreElements()) {
				try {
					st = new StringTokenizer(br.readLine());
					
				}
				catch(IOException e) {
					e.printStackTrace();
				}
				
			} st==null || !st.hasMoreElements() st==null st null !st.hasMoreElements() st.hasMoreElements() st.hasMoreElements st {
				try {
					st = new StringTokenizer(br.readLine());
					
				}
				catch(IOException e) {
					e.printStackTrace();
				}
				
			} try {
					st = new StringTokenizer(br.readLine());
					
				}
				catch(IOException e) {
					e.printStackTrace();
				} catch(IOException e) {
					e.printStackTrace();
				} IOException e {
					e.printStackTrace();
				} e.printStackTrace() e.printStackTrace e {
					st = new StringTokenizer(br.readLine());
					
				} st = new StringTokenizer(br.readLine()) st new StringTokenizer(br.readLine()) return st.nextToken(); st.nextToken() st.nextToken st int nextInt() {
			return Integer.parseInt(next());
		} nextInt {
			return Integer.parseInt(next());
		} return Integer.parseInt(next()); Integer.parseInt(next()) Integer.parseInt Integer next() next long nextLong() {
			return Long.parseLong(next());
		} nextLong {
			return Long.parseLong(next());
		} return Long.parseLong(next()); Long.parseLong(next()) Long.parseLong Long next() next public class Main {
	static class FastReader{
		BufferedReader br;
		StringTokenizer st;
		public FastReader() {
			br =  new BufferedReader(new InputStreamReader(System.in));
		}
		String next() {
			while(st==null || !st.hasMoreElements()) {
				try {
					st = new StringTokenizer(br.readLine());
					
				}
				catch(IOException e) {
					e.printStackTrace();
				}
				
			}
			return st.nextToken();
		}
		int nextInt() {
			return Integer.parseInt(next());
		}
		long nextLong() {
			return Long.parseLong(next());
		}
	}
	public static void main(String[] args) {
		FastReader ob = new FastReader();
		int a =ob.nextInt(),b=ob.nextInt();
		for(int i=1;i<=10000;i++) {
			double k1=Math.floor((double)i*0.08);
			double k2=Math.floor((double)i*0.1);
			if(k1==a && k2==b) {
				System.out.println(i);
				return;
			}
			
		}
		System.out.println("-1");
	}

} public class Main {
	static class FastReader{
		BufferedReader br;
		StringTokenizer st;
		public FastReader() {
			br =  new BufferedReader(new InputStreamReader(System.in));
		}
		String next() {
			while(st==null || !st.hasMoreElements()) {
				try {
					st = new StringTokenizer(br.readLine());
					
				}
				catch(IOException e) {
					e.printStackTrace();
				}
				
			}
			return st.nextToken();
		}
		int nextInt() {
			return Integer.parseInt(next());
		}
		long nextLong() {
			return Long.parseLong(next());
		}
	}
	public static void main(String[] args) {
		FastReader ob = new FastReader();
		int a =ob.nextInt(),b=ob.nextInt();
		for(int i=1;i<=10000;i++) {
			double k1=Math.floor((double)i*0.08);
			double k2=Math.floor((double)i*0.1);
			if(k1==a && k2==b) {
				System.out.println(i);
				return;
			}
			
		}
		System.out.println("-1");
	}

} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
import java.lang.Math;

public class Main {
	static class FastReader{
		BufferedReader br;
		StringTokenizer st;
		public FastReader() {
			br =  new BufferedReader(new InputStreamReader(System.in));
		}
		String next() {
			while(st==null || !st.hasMoreElements()) {
				try {
					st = new StringTokenizer(br.readLine());
					
				}
				catch(IOException e) {
					e.printStackTrace();
				}
				
			}
			return st.nextToken();
		}
		int nextInt() {
			return Integer.parseInt(next());
		}
		long nextLong() {
			return Long.parseLong(next());
		}
	}
	public static void main(String[] args) {
		FastReader ob = new FastReader();
		int a =ob.nextInt(),b=ob.nextInt();
		for(int i=1;i<=10000;i++) {
			double k1=Math.floor((double)i*0.08);
			double k2=Math.floor((double)i*0.1);
			if(k1==a && k2==b) {
				System.out.println(i);
				return;
			}
			
		}
		System.out.println("-1");
	}

}
