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();
        double x = a * 12.5;
        double y = x + 11.25;
        int m = b * 10;
        int n = m + 9;
        int r;
        if(x <= m && m < y){
            r = m;
        }else if(m <= x && x < n){
            if((int)x == x){
                r = (int)x;
            }else {
                r = (int) (x + 1);
            }
        }else{
            r = -1;
        }
        System.out.println(r);
    }
} 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();
        double x = a * 12.5;
        double y = x + 11.25;
        int m = b * 10;
        int n = m + 9;
        int r;
        if(x <= m && m < y){
            r = m;
        }else if(m <= x && x < n){
            if((int)x == x){
                r = (int)x;
            }else {
                r = (int) (x + 1);
            }
        }else{
            r = -1;
        }
        System.out.println(r);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        double x = a * 12.5;
        double y = x + 11.25;
        int m = b * 10;
        int n = m + 9;
        int r;
        if(x <= m && m < y){
            r = m;
        }else if(m <= x && x < n){
            if((int)x == x){
                r = (int)x;
            }else {
                r = (int) (x + 1);
            }
        }else{
            r = -1;
        }
        System.out.println(r);
    } main {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        double x = a * 12.5;
        double y = x + 11.25;
        int m = b * 10;
        int n = m + 9;
        int r;
        if(x <= m && m < y){
            r = m;
        }else if(m <= x && x < n){
            if((int)x == x){
                r = (int)x;
            }else {
                r = (int) (x + 1);
            }
        }else{
            r = -1;
        }
        System.out.println(r);
    } 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 double x = a * 12.5; x a * 12.5 a 12.5 double y = x + 11.25; y x + 11.25 x 11.25 int m = b * 10; m b * 10 b 10 int n = m + 9; n m + 9 m 9 int r; r if(x <= m && m < y){
            r = m;
        }else if(m <= x && x < n){
            if((int)x == x){
                r = (int)x;
            }else {
                r = (int) (x + 1);
            }
        }else{
            r = -1;
        } x <= m && m < y x <= m x m m < y m y {
            r = m;
        } r = m r m if(m <= x && x < n){
            if((int)x == x){
                r = (int)x;
            }else {
                r = (int) (x + 1);
            }
        }else{
            r = -1;
        } m <= x && x < n m <= x m x x < n x n {
            if((int)x == x){
                r = (int)x;
            }else {
                r = (int) (x + 1);
            }
        } if((int)x == x){
                r = (int)x;
            }else {
                r = (int) (x + 1);
            } (int)x == x (int)x x {
                r = (int)x;
            } r = (int)x r (int)x {
                r = (int) (x + 1);
            } r = (int) (x + 1) r (int) (x + 1) x 1 {
            r = -1;
        } r = -1 r -1 1 System.out.println(r) System.out.println System.out System System.out r 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();
        double x = a * 12.5;
        double y = x + 11.25;
        int m = b * 10;
        int n = m + 9;
        int r;
        if(x <= m && m < y){
            r = m;
        }else if(m <= x && x < n){
            if((int)x == x){
                r = (int)x;
            }else {
                r = (int) (x + 1);
            }
        }else{
            r = -1;
        }
        System.out.println(r);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        double x = a * 12.5;
        double y = x + 11.25;
        int m = b * 10;
        int n = m + 9;
        int r;
        if(x <= m && m < y){
            r = m;
        }else if(m <= x && x < n){
            if((int)x == x){
                r = (int)x;
            }else {
                r = (int) (x + 1);
            }
        }else{
            r = -1;
        }
        System.out.println(r);
    }
} 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();
        double x = a * 12.5;
        double y = x + 11.25;
        int m = b * 10;
        int n = m + 9;
        int r;
        if(x <= m && m < y){
            r = m;
        }else if(m <= x && x < n){
            if((int)x == x){
                r = (int)x;
            }else {
                r = (int) (x + 1);
            }
        }else{
            r = -1;
        }
        System.out.println(r);
    }
}