import java.util.*;

public class Main{
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		int A = scan.nextInt();
		int B = scan.nextInt();
		int i = 0;
		int a_tax = (int)(i * 0.08);
		int b_tax = (int)(i * 0.1);
		int ans = -1;
		while( i < 1000){
			i++;
			a_tax = (int)(i * 0.08);
			b_tax = (int)(i * 0.1);
			if (a_tax == A && b_tax == B){
				ans = i;
				break;
			}
		}
		System.out.println(ans);
	}
} import java.util.*; util.* java public class Main{
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		int A = scan.nextInt();
		int B = scan.nextInt();
		int i = 0;
		int a_tax = (int)(i * 0.08);
		int b_tax = (int)(i * 0.1);
		int ans = -1;
		while( i < 1000){
			i++;
			a_tax = (int)(i * 0.08);
			b_tax = (int)(i * 0.1);
			if (a_tax == A && b_tax == B){
				ans = i;
				break;
			}
		}
		System.out.println(ans);
	}
} Main public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		int A = scan.nextInt();
		int B = scan.nextInt();
		int i = 0;
		int a_tax = (int)(i * 0.08);
		int b_tax = (int)(i * 0.1);
		int ans = -1;
		while( i < 1000){
			i++;
			a_tax = (int)(i * 0.08);
			b_tax = (int)(i * 0.1);
			if (a_tax == A && b_tax == B){
				ans = i;
				break;
			}
		}
		System.out.println(ans);
	} main {
		Scanner scan = new Scanner(System.in);
		int A = scan.nextInt();
		int B = scan.nextInt();
		int i = 0;
		int a_tax = (int)(i * 0.08);
		int b_tax = (int)(i * 0.1);
		int ans = -1;
		while( i < 1000){
			i++;
			a_tax = (int)(i * 0.08);
			b_tax = (int)(i * 0.1);
			if (a_tax == A && b_tax == B){
				ans = i;
				break;
			}
		}
		System.out.println(ans);
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int A = scan.nextInt(); A scan.nextInt() scan.nextInt scan int B = scan.nextInt(); B scan.nextInt() scan.nextInt scan int i = 0; i 0 int a_tax = (int)(i * 0.08); a_tax (int)(i * 0.08) i 0.08 int b_tax = (int)(i * 0.1); b_tax (int)(i * 0.1) i 0.1 int ans = -1; ans -1 1 while( i < 1000){
			i++;
			a_tax = (int)(i * 0.08);
			b_tax = (int)(i * 0.1);
			if (a_tax == A && b_tax == B){
				ans = i;
				break;
			}
		} i < 1000 i 1000 {
			i++;
			a_tax = (int)(i * 0.08);
			b_tax = (int)(i * 0.1);
			if (a_tax == A && b_tax == B){
				ans = i;
				break;
			}
		} i++ i a_tax = (int)(i * 0.08) a_tax (int)(i * 0.08) i 0.08 b_tax = (int)(i * 0.1) b_tax (int)(i * 0.1) i 0.1 if (a_tax == A && b_tax == B){
				ans = i;
				break;
			} a_tax == A && b_tax == B a_tax == A a_tax A b_tax == B b_tax 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{
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		int A = scan.nextInt();
		int B = scan.nextInt();
		int i = 0;
		int a_tax = (int)(i * 0.08);
		int b_tax = (int)(i * 0.1);
		int ans = -1;
		while( i < 1000){
			i++;
			a_tax = (int)(i * 0.08);
			b_tax = (int)(i * 0.1);
			if (a_tax == A && b_tax == B){
				ans = i;
				break;
			}
		}
		System.out.println(ans);
	}
} public class Main{
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		int A = scan.nextInt();
		int B = scan.nextInt();
		int i = 0;
		int a_tax = (int)(i * 0.08);
		int b_tax = (int)(i * 0.1);
		int ans = -1;
		while( i < 1000){
			i++;
			a_tax = (int)(i * 0.08);
			b_tax = (int)(i * 0.1);
			if (a_tax == A && b_tax == B){
				ans = i;
				break;
			}
		}
		System.out.println(ans);
	}
} Main
import java.util.*;

public class Main{
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		int A = scan.nextInt();
		int B = scan.nextInt();
		int i = 0;
		int a_tax = (int)(i * 0.08);
		int b_tax = (int)(i * 0.1);
		int ans = -1;
		while( i < 1000){
			i++;
			a_tax = (int)(i * 0.08);
			b_tax = (int)(i * 0.1);
			if (a_tax == A && b_tax == B){
				ans = i;
				break;
			}
		}
		System.out.println(ans);
	}
}