import java.util.Scanner;

public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        for(int price = b * 10; price < (b + 1) * 10; price++){
            if(price * 8 / 100 == a && price * 10 / 100 == b){
                System.out.println(price);
                return;
            }
        }
        System.out.println(-1);
    }
} import java.util.Scanner; Scanner 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();
        for(int price = b * 10; price < (b + 1) * 10; price++){
            if(price * 8 / 100 == a && price * 10 / 100 == b){
                System.out.println(price);
                return;
            }
        }
        System.out.println(-1);
    }
} Main public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        for(int price = b * 10; price < (b + 1) * 10; price++){
            if(price * 8 / 100 == a && price * 10 / 100 == b){
                System.out.println(price);
                return;
            }
        }
        System.out.println(-1);
    } main {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        for(int price = b * 10; price < (b + 1) * 10; price++){
            if(price * 8 / 100 == a && price * 10 / 100 == b){
                System.out.println(price);
                return;
            }
        }
        System.out.println(-1);
    } 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 price = b * 10; price < (b + 1) * 10; price++){
            if(price * 8 / 100 == a && price * 10 / 100 == b){
                System.out.println(price);
                return;
            }
        } int price = b * 10; int price = b * 10; price b * 10 b 10 price < (b + 1) * 10 price (b + 1) * 10 (b + 1) b 1 10 price++ price++ price {
            if(price * 8 / 100 == a && price * 10 / 100 == b){
                System.out.println(price);
                return;
            }
        } {
            if(price * 8 / 100 == a && price * 10 / 100 == b){
                System.out.println(price);
                return;
            }
        } if(price * 8 / 100 == a && price * 10 / 100 == b){
                System.out.println(price);
                return;
            } price * 8 / 100 == a && price * 10 / 100 == b price * 8 / 100 == a price * 8 / 100 price * 8 price 8 100 a price * 10 / 100 == b price * 10 / 100 price * 10 price 10 100 b {
                System.out.println(price);
                return;
            } System.out.println(price) System.out.println System.out System System.out price return; System.out.println(-1) System.out.println System.out System System.out -1 1 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();
        for(int price = b * 10; price < (b + 1) * 10; price++){
            if(price * 8 / 100 == a && price * 10 / 100 == b){
                System.out.println(price);
                return;
            }
        }
        System.out.println(-1);
    }
} public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        for(int price = b * 10; price < (b + 1) * 10; price++){
            if(price * 8 / 100 == a && price * 10 / 100 == b){
                System.out.println(price);
                return;
            }
        }
        System.out.println(-1);
    }
} Main
import java.util.Scanner;

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