import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        String data = sc.nextLine();
        
        String[] array = data.split(" ");
        int a = Integer.parseInt(array[0]);
        int b = Integer.parseInt(array[1]);
        
        int zeinuki = 1;
        
        while(zeinuki <= 1009)
        {
            int zei08 = (int)(zeinuki * 0.08);
            int zei10 = (int)(zeinuki * 0.1);
            if(zei08 == a && zei10 == b)
            {
                break;
            }
            zeinuki++;
        }
        
        if(zeinuki == 1010)
        {
            zeinuki = -1;
        }
        
        System.out.println(zeinuki);
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        String data = sc.nextLine();
        
        String[] array = data.split(" ");
        int a = Integer.parseInt(array[0]);
        int b = Integer.parseInt(array[1]);
        
        int zeinuki = 1;
        
        while(zeinuki <= 1009)
        {
            int zei08 = (int)(zeinuki * 0.08);
            int zei10 = (int)(zeinuki * 0.1);
            if(zei08 == a && zei10 == b)
            {
                break;
            }
            zeinuki++;
        }
        
        if(zeinuki == 1010)
        {
            zeinuki = -1;
        }
        
        System.out.println(zeinuki);
    }
} Main public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        String data = sc.nextLine();
        
        String[] array = data.split(" ");
        int a = Integer.parseInt(array[0]);
        int b = Integer.parseInt(array[1]);
        
        int zeinuki = 1;
        
        while(zeinuki <= 1009)
        {
            int zei08 = (int)(zeinuki * 0.08);
            int zei10 = (int)(zeinuki * 0.1);
            if(zei08 == a && zei10 == b)
            {
                break;
            }
            zeinuki++;
        }
        
        if(zeinuki == 1010)
        {
            zeinuki = -1;
        }
        
        System.out.println(zeinuki);
    } main {
        Scanner sc = new Scanner(System.in);
        String data = sc.nextLine();
        
        String[] array = data.split(" ");
        int a = Integer.parseInt(array[0]);
        int b = Integer.parseInt(array[1]);
        
        int zeinuki = 1;
        
        while(zeinuki <= 1009)
        {
            int zei08 = (int)(zeinuki * 0.08);
            int zei10 = (int)(zeinuki * 0.1);
            if(zei08 == a && zei10 == b)
            {
                break;
            }
            zeinuki++;
        }
        
        if(zeinuki == 1010)
        {
            zeinuki = -1;
        }
        
        System.out.println(zeinuki);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String data = sc.nextLine(); data sc.nextLine() sc.nextLine sc String[] array = data.split(" "); array data.split(" ") data.split data " " int a = Integer.parseInt(array[0]); a Integer.parseInt(array[0]) Integer.parseInt Integer array[0] array 0 int b = Integer.parseInt(array[1]); b Integer.parseInt(array[1]) Integer.parseInt Integer array[1] array 1 int zeinuki = 1; zeinuki 1 while(zeinuki <= 1009)
        {
            int zei08 = (int)(zeinuki * 0.08);
            int zei10 = (int)(zeinuki * 0.1);
            if(zei08 == a && zei10 == b)
            {
                break;
            }
            zeinuki++;
        } zeinuki <= 1009 zeinuki 1009 {
            int zei08 = (int)(zeinuki * 0.08);
            int zei10 = (int)(zeinuki * 0.1);
            if(zei08 == a && zei10 == b)
            {
                break;
            }
            zeinuki++;
        } int zei08 = (int)(zeinuki * 0.08); zei08 (int)(zeinuki * 0.08) zeinuki 0.08 int zei10 = (int)(zeinuki * 0.1); zei10 (int)(zeinuki * 0.1) zeinuki 0.1 if(zei08 == a && zei10 == b)
            {
                break;
            } zei08 == a && zei10 == b zei08 == a zei08 a zei10 == b zei10 b {
                break;
            } break; zeinuki++ zeinuki if(zeinuki == 1010)
        {
            zeinuki = -1;
        } zeinuki == 1010 zeinuki 1010 {
            zeinuki = -1;
        } zeinuki = -1 zeinuki -1 1 System.out.println(zeinuki) System.out.println System.out System System.out zeinuki String[] args args public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        String data = sc.nextLine();
        
        String[] array = data.split(" ");
        int a = Integer.parseInt(array[0]);
        int b = Integer.parseInt(array[1]);
        
        int zeinuki = 1;
        
        while(zeinuki <= 1009)
        {
            int zei08 = (int)(zeinuki * 0.08);
            int zei10 = (int)(zeinuki * 0.1);
            if(zei08 == a && zei10 == b)
            {
                break;
            }
            zeinuki++;
        }
        
        if(zeinuki == 1010)
        {
            zeinuki = -1;
        }
        
        System.out.println(zeinuki);
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        String data = sc.nextLine();
        
        String[] array = data.split(" ");
        int a = Integer.parseInt(array[0]);
        int b = Integer.parseInt(array[1]);
        
        int zeinuki = 1;
        
        while(zeinuki <= 1009)
        {
            int zei08 = (int)(zeinuki * 0.08);
            int zei10 = (int)(zeinuki * 0.1);
            if(zei08 == a && zei10 == b)
            {
                break;
            }
            zeinuki++;
        }
        
        if(zeinuki == 1010)
        {
            zeinuki = -1;
        }
        
        System.out.println(zeinuki);
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        String data = sc.nextLine();
        
        String[] array = data.split(" ");
        int a = Integer.parseInt(array[0]);
        int b = Integer.parseInt(array[1]);
        
        int zeinuki = 1;
        
        while(zeinuki <= 1009)
        {
            int zei08 = (int)(zeinuki * 0.08);
            int zei10 = (int)(zeinuki * 0.1);
            if(zei08 == a && zei10 == b)
            {
                break;
            }
            zeinuki++;
        }
        
        if(zeinuki == 1010)
        {
            zeinuki = -1;
        }
        
        System.out.println(zeinuki);
    }
}
