import java.util.*;
import java.lang.Math;
public class Main{
	public static void main(String [] args){
		Scanner in = new Scanner(System.in);
		double a = in.nextInt();
		double b = in.nextInt();
		for(int i=0;i<=1000;i++){
			double x = Math.floor(i*0.08);
			double y = Math.floor(i*0.1);
			if(x==a && y==b){
				System.out.print(i);
				break;
			}
			else if(i==1000){
				System.out.print("-1");
			}
			
		}
	}
} import java.util.*; util.* java import java.lang.Math; Math java.lang public class Main{
	public static void main(String [] args){
		Scanner in = new Scanner(System.in);
		double a = in.nextInt();
		double b = in.nextInt();
		for(int i=0;i<=1000;i++){
			double x = Math.floor(i*0.08);
			double y = Math.floor(i*0.1);
			if(x==a && y==b){
				System.out.print(i);
				break;
			}
			else if(i==1000){
				System.out.print("-1");
			}
			
		}
	}
} Main public static void main(String [] args){
		Scanner in = new Scanner(System.in);
		double a = in.nextInt();
		double b = in.nextInt();
		for(int i=0;i<=1000;i++){
			double x = Math.floor(i*0.08);
			double y = Math.floor(i*0.1);
			if(x==a && y==b){
				System.out.print(i);
				break;
			}
			else if(i==1000){
				System.out.print("-1");
			}
			
		}
	} main {
		Scanner in = new Scanner(System.in);
		double a = in.nextInt();
		double b = in.nextInt();
		for(int i=0;i<=1000;i++){
			double x = Math.floor(i*0.08);
			double y = Math.floor(i*0.1);
			if(x==a && y==b){
				System.out.print(i);
				break;
			}
			else if(i==1000){
				System.out.print("-1");
			}
			
		}
	} Scanner in = new Scanner(System.in); in new Scanner(System.in) double a = in.nextInt(); a in.nextInt() in.nextInt in double b = in.nextInt(); b in.nextInt() in.nextInt in for(int i=0;i<=1000;i++){
			double x = Math.floor(i*0.08);
			double y = Math.floor(i*0.1);
			if(x==a && y==b){
				System.out.print(i);
				break;
			}
			else if(i==1000){
				System.out.print("-1");
			}
			
		} int i=0; int i=0; i 0 i<=1000 i 1000 i++ i++ i {
			double x = Math.floor(i*0.08);
			double y = Math.floor(i*0.1);
			if(x==a && y==b){
				System.out.print(i);
				break;
			}
			else if(i==1000){
				System.out.print("-1");
			}
			
		} {
			double x = Math.floor(i*0.08);
			double y = Math.floor(i*0.1);
			if(x==a && y==b){
				System.out.print(i);
				break;
			}
			else if(i==1000){
				System.out.print("-1");
			}
			
		} double x = Math.floor(i*0.08); x Math.floor(i*0.08) Math.floor Math i*0.08 i 0.08 double y = Math.floor(i*0.1); y Math.floor(i*0.1) Math.floor Math i*0.1 i 0.1 if(x==a && y==b){
				System.out.print(i);
				break;
			}
			else if(i==1000){
				System.out.print("-1");
			} x==a && y==b x==a x a y==b y b {
				System.out.print(i);
				break;
			} System.out.print(i) System.out.print System.out System System.out i break; if(i==1000){
				System.out.print("-1");
			} i==1000 i 1000 {
				System.out.print("-1");
			} System.out.print("-1") System.out.print System.out System System.out "-1" String [] args args public class Main{
	public static void main(String [] args){
		Scanner in = new Scanner(System.in);
		double a = in.nextInt();
		double b = in.nextInt();
		for(int i=0;i<=1000;i++){
			double x = Math.floor(i*0.08);
			double y = Math.floor(i*0.1);
			if(x==a && y==b){
				System.out.print(i);
				break;
			}
			else if(i==1000){
				System.out.print("-1");
			}
			
		}
	}
} public class Main{
	public static void main(String [] args){
		Scanner in = new Scanner(System.in);
		double a = in.nextInt();
		double b = in.nextInt();
		for(int i=0;i<=1000;i++){
			double x = Math.floor(i*0.08);
			double y = Math.floor(i*0.1);
			if(x==a && y==b){
				System.out.print(i);
				break;
			}
			else if(i==1000){
				System.out.print("-1");
			}
			
		}
	}
} Main
import java.util.*;
import java.lang.Math;
public class Main{
	public static void main(String [] args){
		Scanner in = new Scanner(System.in);
		double a = in.nextInt();
		double b = in.nextInt();
		for(int i=0;i<=1000;i++){
			double x = Math.floor(i*0.08);
			double y = Math.floor(i*0.1);
			if(x==a && y==b){
				System.out.print(i);
				break;
			}
			else if(i==1000){
				System.out.print("-1");
			}
			
		}
	}
}