import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);		
		int a = sc.nextInt();
        int b = sc.nextInt();
		int c = -1;
        for(int i=1;i<=1000;i++){if((i*8)/100==a && (i*10)/100==b){c=i;break;}}
		System.out.println(c);
	}
} import java.util.*; util.* java public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);		
		int a = sc.nextInt();
        int b = sc.nextInt();
		int c = -1;
        for(int i=1;i<=1000;i++){if((i*8)/100==a && (i*10)/100==b){c=i;break;}}
		System.out.println(c);
	}
} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);		
		int a = sc.nextInt();
        int b = sc.nextInt();
		int c = -1;
        for(int i=1;i<=1000;i++){if((i*8)/100==a && (i*10)/100==b){c=i;break;}}
		System.out.println(c);
	} main {
		Scanner sc = new Scanner(System.in);		
		int a = sc.nextInt();
        int b = sc.nextInt();
		int c = -1;
        for(int i=1;i<=1000;i++){if((i*8)/100==a && (i*10)/100==b){c=i;break;}}
		System.out.println(c);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc int b = sc.nextInt(); b sc.nextInt() sc.nextInt sc int c = -1; c -1 1 for(int i=1;i<=1000;i++){if((i*8)/100==a && (i*10)/100==b){c=i;break;}} int i=1; int i=1; i 1 i<=1000 i 1000 i++ i++ i {if((i*8)/100==a && (i*10)/100==b){c=i;break;}} {if((i*8)/100==a && (i*10)/100==b){c=i;break;}} if((i*8)/100==a && (i*10)/100==b){c=i;break;} (i*8)/100==a && (i*10)/100==b (i*8)/100==a (i*8)/100 (i*8) i 8 100 a (i*10)/100==b (i*10)/100 (i*10) i 10 100 b {c=i;break;} c=i c i break; System.out.println(c) System.out.println System.out System System.out c String[] args args public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);		
		int a = sc.nextInt();
        int b = sc.nextInt();
		int c = -1;
        for(int i=1;i<=1000;i++){if((i*8)/100==a && (i*10)/100==b){c=i;break;}}
		System.out.println(c);
	}
} public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);		
		int a = sc.nextInt();
        int b = sc.nextInt();
		int c = -1;
        for(int i=1;i<=1000;i++){if((i*8)/100==a && (i*10)/100==b){c=i;break;}}
		System.out.println(c);
	}
} Main
import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);		
		int a = sc.nextInt();
        int b = sc.nextInt();
		int c = -1;
        for(int i=1;i<=1000;i++){if((i*8)/100==a && (i*10)/100==b){c=i;break;}}
		System.out.println(c);
	}
}
