import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here! 
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        
        for (int i = 1; i <= 1001001009; i++) {
            double tmp1 = i*0.08;
            int tmpa = (int)tmp1;
            double tmp2 = i*0.1;
            int tmpb = (int)tmp2;
            
            if (tmpa == a && tmpb == b) {
                System.out.println(i);
                return;
            }
            
            if (tmpa > a && tmpb > b) {
                System.out.println(-1);
                return;
            }
        }
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here! 
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        
        for (int i = 1; i <= 1001001009; i++) {
            double tmp1 = i*0.08;
            int tmpa = (int)tmp1;
            double tmp2 = i*0.1;
            int tmpb = (int)tmp2;
            
            if (tmpa == a && tmpb == b) {
                System.out.println(i);
                return;
            }
            
            if (tmpa > a && tmpb > b) {
                System.out.println(-1);
                return;
            }
        }
    }
} Main public static void main(String[] args) throws Exception {
        // Your code here! 
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        
        for (int i = 1; i <= 1001001009; i++) {
            double tmp1 = i*0.08;
            int tmpa = (int)tmp1;
            double tmp2 = i*0.1;
            int tmpb = (int)tmp2;
            
            if (tmpa == a && tmpb == b) {
                System.out.println(i);
                return;
            }
            
            if (tmpa > a && tmpb > b) {
                System.out.println(-1);
                return;
            }
        }
    } main {
        // Your code here! 
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        
        for (int i = 1; i <= 1001001009; i++) {
            double tmp1 = i*0.08;
            int tmpa = (int)tmp1;
            double tmp2 = i*0.1;
            int tmpb = (int)tmp2;
            
            if (tmpa == a && tmpb == b) {
                System.out.println(i);
                return;
            }
            
            if (tmpa > a && tmpb > b) {
                System.out.println(-1);
                return;
            }
        }
    } 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 for (int i = 1; i <= 1001001009; i++) {
            double tmp1 = i*0.08;
            int tmpa = (int)tmp1;
            double tmp2 = i*0.1;
            int tmpb = (int)tmp2;
            
            if (tmpa == a && tmpb == b) {
                System.out.println(i);
                return;
            }
            
            if (tmpa > a && tmpb > b) {
                System.out.println(-1);
                return;
            }
        } int i = 1; int i = 1; i 1 i <= 1001001009 i 1001001009 i++ i++ i {
            double tmp1 = i*0.08;
            int tmpa = (int)tmp1;
            double tmp2 = i*0.1;
            int tmpb = (int)tmp2;
            
            if (tmpa == a && tmpb == b) {
                System.out.println(i);
                return;
            }
            
            if (tmpa > a && tmpb > b) {
                System.out.println(-1);
                return;
            }
        } {
            double tmp1 = i*0.08;
            int tmpa = (int)tmp1;
            double tmp2 = i*0.1;
            int tmpb = (int)tmp2;
            
            if (tmpa == a && tmpb == b) {
                System.out.println(i);
                return;
            }
            
            if (tmpa > a && tmpb > b) {
                System.out.println(-1);
                return;
            }
        } double tmp1 = i*0.08; tmp1 i*0.08 i 0.08 int tmpa = (int)tmp1; tmpa (int)tmp1 double tmp2 = i*0.1; tmp2 i*0.1 i 0.1 int tmpb = (int)tmp2; tmpb (int)tmp2 if (tmpa == a && tmpb == b) {
                System.out.println(i);
                return;
            } tmpa == a && tmpb == b tmpa == a tmpa a tmpb == b tmpb b {
                System.out.println(i);
                return;
            } System.out.println(i) System.out.println System.out System System.out i return; if (tmpa > a && tmpb > b) {
                System.out.println(-1);
                return;
            } tmpa > a && tmpb > b tmpa > a tmpa a tmpb > b tmpb b {
                System.out.println(-1);
                return;
            } System.out.println(-1) System.out.println System.out System System.out -1 1 return; String[] args args public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here! 
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        
        for (int i = 1; i <= 1001001009; i++) {
            double tmp1 = i*0.08;
            int tmpa = (int)tmp1;
            double tmp2 = i*0.1;
            int tmpb = (int)tmp2;
            
            if (tmpa == a && tmpb == b) {
                System.out.println(i);
                return;
            }
            
            if (tmpa > a && tmpb > b) {
                System.out.println(-1);
                return;
            }
        }
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here! 
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        
        for (int i = 1; i <= 1001001009; i++) {
            double tmp1 = i*0.08;
            int tmpa = (int)tmp1;
            double tmp2 = i*0.1;
            int tmpb = (int)tmp2;
            
            if (tmpa == a && tmpb == b) {
                System.out.println(i);
                return;
            }
            
            if (tmpa > a && tmpb > b) {
                System.out.println(-1);
                return;
            }
        }
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here! 
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        
        for (int i = 1; i <= 1001001009; i++) {
            double tmp1 = i*0.08;
            int tmpa = (int)tmp1;
            double tmp2 = i*0.1;
            int tmpb = (int)tmp2;
            
            if (tmpa == a && tmpb == b) {
                System.out.println(i);
                return;
            }
            
            if (tmpa > a && tmpb > b) {
                System.out.println(-1);
                return;
            }
        }
    }
}