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();
        //A <= 0.08x < A + 1
        //B <= 0.10x < B + 1
        
        int axmin = (int)(A / 0.08);
        int axmax = (int)((A+1) / 0.08);
        int bxmin = B * 10;
        int bxmax = (B+1) * 10;
        
        int ans = -1;
        for(int i = 1; i <= 1009; i++) {
            if((int)(0.08 * i) == A && (int)(0.1 * i) / 1 == B) {
                ans = i;
                break;
            }
        }
        System.out.println(ans);
        
    }
} 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();
        //A <= 0.08x < A + 1
        //B <= 0.10x < B + 1
        
        int axmin = (int)(A / 0.08);
        int axmax = (int)((A+1) / 0.08);
        int bxmin = B * 10;
        int bxmax = (B+1) * 10;
        
        int ans = -1;
        for(int i = 1; i <= 1009; i++) {
            if((int)(0.08 * i) == A && (int)(0.1 * i) / 1 == B) {
                ans = i;
                break;
            }
        }
        System.out.println(ans);
        
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int A = sc.nextInt();
        int B = sc.nextInt();
        //A <= 0.08x < A + 1
        //B <= 0.10x < B + 1
        
        int axmin = (int)(A / 0.08);
        int axmax = (int)((A+1) / 0.08);
        int bxmin = B * 10;
        int bxmax = (B+1) * 10;
        
        int ans = -1;
        for(int i = 1; i <= 1009; i++) {
            if((int)(0.08 * i) == A && (int)(0.1 * i) / 1 == B) {
                ans = i;
                break;
            }
        }
        System.out.println(ans);
        
    } main {
        Scanner sc = new Scanner(System.in);
        int A = sc.nextInt();
        int B = sc.nextInt();
        //A <= 0.08x < A + 1
        //B <= 0.10x < B + 1
        
        int axmin = (int)(A / 0.08);
        int axmax = (int)((A+1) / 0.08);
        int bxmin = B * 10;
        int bxmax = (B+1) * 10;
        
        int ans = -1;
        for(int i = 1; i <= 1009; i++) {
            if((int)(0.08 * i) == A && (int)(0.1 * i) / 1 == B) {
                ans = i;
                break;
            }
        }
        System.out.println(ans);
        
    } 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 axmin = (int)(A / 0.08); axmin (int)(A / 0.08) A 0.08 int axmax = (int)((A+1) / 0.08); axmax (int)((A+1) / 0.08) (A+1) A 1 0.08 int bxmin = B * 10; bxmin B * 10 B 10 int bxmax = (B+1) * 10; bxmax (B+1) * 10 (B+1) B 1 10 int ans = -1; ans -1 1 for(int i = 1; i <= 1009; i++) {
            if((int)(0.08 * i) == A && (int)(0.1 * i) / 1 == B) {
                ans = i;
                break;
            }
        } int i = 1; int i = 1; i 1 i <= 1009 i 1009 i++ i++ i {
            if((int)(0.08 * i) == A && (int)(0.1 * i) / 1 == B) {
                ans = i;
                break;
            }
        } {
            if((int)(0.08 * i) == A && (int)(0.1 * i) / 1 == B) {
                ans = i;
                break;
            }
        } if((int)(0.08 * i) == A && (int)(0.1 * i) / 1 == B) {
                ans = i;
                break;
            } (int)(0.08 * i) == A && (int)(0.1 * i) / 1 == B (int)(0.08 * i) == A (int)(0.08 * i) 0.08 i A (int)(0.1 * i) / 1 == B (int)(0.1 * i) / 1 (int)(0.1 * i) 0.1 i 1 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 sc = new Scanner(System.in);
        int A = sc.nextInt();
        int B = sc.nextInt();
        //A <= 0.08x < A + 1
        //B <= 0.10x < B + 1
        
        int axmin = (int)(A / 0.08);
        int axmax = (int)((A+1) / 0.08);
        int bxmin = B * 10;
        int bxmax = (B+1) * 10;
        
        int ans = -1;
        for(int i = 1; i <= 1009; i++) {
            if((int)(0.08 * i) == A && (int)(0.1 * i) / 1 == B) {
                ans = i;
                break;
            }
        }
        System.out.println(ans);
        
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int A = sc.nextInt();
        int B = sc.nextInt();
        //A <= 0.08x < A + 1
        //B <= 0.10x < B + 1
        
        int axmin = (int)(A / 0.08);
        int axmax = (int)((A+1) / 0.08);
        int bxmin = B * 10;
        int bxmax = (B+1) * 10;
        
        int ans = -1;
        for(int i = 1; i <= 1009; i++) {
            if((int)(0.08 * i) == A && (int)(0.1 * i) / 1 == B) {
                ans = i;
                break;
            }
        }
        System.out.println(ans);
        
    }
} 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();
        //A <= 0.08x < A + 1
        //B <= 0.10x < B + 1
        
        int axmin = (int)(A / 0.08);
        int axmax = (int)((A+1) / 0.08);
        int bxmin = B * 10;
        int bxmax = (B+1) * 10;
        
        int ans = -1;
        for(int i = 1; i <= 1009; i++) {
            if((int)(0.08 * i) == A && (int)(0.1 * i) / 1 == B) {
                ans = i;
                break;
            }
        }
        System.out.println(ans);
        
    }
}