import java.util.Scanner;

public class Main
{
    public static void main(String [] args)
    {
        Scanner key = new Scanner(System.in);
        int eight = key.nextInt();
        int ten = key.nextInt();
        int value = 0;
        int flag = -1;
        end:
        for(int i = 1; i<1001; i++)
        {
            double a = i*(0.08);
            if((int)a == eight)
            {
                double b = i*(0.1);
                if((int)b == ten)
                {
                    flag = 0;
                    value = i;
                    break end;
                }
            }
        }
        if(flag == 0)
            System.out.println(value);
        else
            System.out.println("-1");
    }
} import java.util.Scanner; Scanner java.util public class Main
{
    public static void main(String [] args)
    {
        Scanner key = new Scanner(System.in);
        int eight = key.nextInt();
        int ten = key.nextInt();
        int value = 0;
        int flag = -1;
        end:
        for(int i = 1; i<1001; i++)
        {
            double a = i*(0.08);
            if((int)a == eight)
            {
                double b = i*(0.1);
                if((int)b == ten)
                {
                    flag = 0;
                    value = i;
                    break end;
                }
            }
        }
        if(flag == 0)
            System.out.println(value);
        else
            System.out.println("-1");
    }
} Main public static void main(String [] args)
    {
        Scanner key = new Scanner(System.in);
        int eight = key.nextInt();
        int ten = key.nextInt();
        int value = 0;
        int flag = -1;
        end:
        for(int i = 1; i<1001; i++)
        {
            double a = i*(0.08);
            if((int)a == eight)
            {
                double b = i*(0.1);
                if((int)b == ten)
                {
                    flag = 0;
                    value = i;
                    break end;
                }
            }
        }
        if(flag == 0)
            System.out.println(value);
        else
            System.out.println("-1");
    } main {
        Scanner key = new Scanner(System.in);
        int eight = key.nextInt();
        int ten = key.nextInt();
        int value = 0;
        int flag = -1;
        end:
        for(int i = 1; i<1001; i++)
        {
            double a = i*(0.08);
            if((int)a == eight)
            {
                double b = i*(0.1);
                if((int)b == ten)
                {
                    flag = 0;
                    value = i;
                    break end;
                }
            }
        }
        if(flag == 0)
            System.out.println(value);
        else
            System.out.println("-1");
    } Scanner key = new Scanner(System.in); key new Scanner(System.in) int eight = key.nextInt(); eight key.nextInt() key.nextInt key int ten = key.nextInt(); ten key.nextInt() key.nextInt key int value = 0; value 0 int flag = -1; flag -1 1 if(flag == 0)
            System.out.println(value);
        else
            System.out.println("-1"); flag == 0 flag 0 System.out.println(value) System.out.println System.out System System.out value System.out.println("-1") System.out.println System.out System System.out "-1" String [] args args public class Main
{
    public static void main(String [] args)
    {
        Scanner key = new Scanner(System.in);
        int eight = key.nextInt();
        int ten = key.nextInt();
        int value = 0;
        int flag = -1;
        end:
        for(int i = 1; i<1001; i++)
        {
            double a = i*(0.08);
            if((int)a == eight)
            {
                double b = i*(0.1);
                if((int)b == ten)
                {
                    flag = 0;
                    value = i;
                    break end;
                }
            }
        }
        if(flag == 0)
            System.out.println(value);
        else
            System.out.println("-1");
    }
} public class Main
{
    public static void main(String [] args)
    {
        Scanner key = new Scanner(System.in);
        int eight = key.nextInt();
        int ten = key.nextInt();
        int value = 0;
        int flag = -1;
        end:
        for(int i = 1; i<1001; i++)
        {
            double a = i*(0.08);
            if((int)a == eight)
            {
                double b = i*(0.1);
                if((int)b == ten)
                {
                    flag = 0;
                    value = i;
                    break end;
                }
            }
        }
        if(flag == 0)
            System.out.println(value);
        else
            System.out.println("-1");
    }
} Main
import java.util.Scanner;

public class Main
{
    public static void main(String [] args)
    {
        Scanner key = new Scanner(System.in);
        int eight = key.nextInt();
        int ten = key.nextInt();
        int value = 0;
        int flag = -1;
        end:
        for(int i = 1; i<1001; i++)
        {
            double a = i*(0.08);
            if((int)a == eight)
            {
                double b = i*(0.1);
                if((int)b == ten)
                {
                    flag = 0;
                    value = i;
                    break end;
                }
            }
        }
        if(flag == 0)
            System.out.println(value);
        else
            System.out.println("-1");
    }
}