import java.util.Scanner;

class Main {
    public static void main(String[] args) {
        Scanner stdIn = new Scanner(System.in);
        int a = Integer.parseInt(stdIn.next());
        int b = Integer.parseInt(stdIn.next());

        int pl = 0;
        int pr = 1250;
        do {
            int pc = (pl + pr) / 2;
            if ((int)(pc * 0.08) == a && (int)(pc * 0.1) == b) {
                while ((int)(pc * 0.08) == a && (int)(pc * 0.1) == b) {
                    pc--;
                }
                pc++;
                System.out.println(pc);
                return;
            } else if ((int)(pc * 0.08) < a || (int)(pc * 0.1) < b) {
                pl = pc + 1;
            } else if ((int)(pc * 0.08) > a || (int)(pc * 0.1) > b) {
                pr = pc - 1;
            }
        } while (pl <= pr);

        System.out.println(-1);
    }
} import java.util.Scanner; Scanner java.util class Main {
    public static void main(String[] args) {
        Scanner stdIn = new Scanner(System.in);
        int a = Integer.parseInt(stdIn.next());
        int b = Integer.parseInt(stdIn.next());

        int pl = 0;
        int pr = 1250;
        do {
            int pc = (pl + pr) / 2;
            if ((int)(pc * 0.08) == a && (int)(pc * 0.1) == b) {
                while ((int)(pc * 0.08) == a && (int)(pc * 0.1) == b) {
                    pc--;
                }
                pc++;
                System.out.println(pc);
                return;
            } else if ((int)(pc * 0.08) < a || (int)(pc * 0.1) < b) {
                pl = pc + 1;
            } else if ((int)(pc * 0.08) > a || (int)(pc * 0.1) > b) {
                pr = pc - 1;
            }
        } while (pl <= pr);

        System.out.println(-1);
    }
} Main public static void main(String[] args) {
        Scanner stdIn = new Scanner(System.in);
        int a = Integer.parseInt(stdIn.next());
        int b = Integer.parseInt(stdIn.next());

        int pl = 0;
        int pr = 1250;
        do {
            int pc = (pl + pr) / 2;
            if ((int)(pc * 0.08) == a && (int)(pc * 0.1) == b) {
                while ((int)(pc * 0.08) == a && (int)(pc * 0.1) == b) {
                    pc--;
                }
                pc++;
                System.out.println(pc);
                return;
            } else if ((int)(pc * 0.08) < a || (int)(pc * 0.1) < b) {
                pl = pc + 1;
            } else if ((int)(pc * 0.08) > a || (int)(pc * 0.1) > b) {
                pr = pc - 1;
            }
        } while (pl <= pr);

        System.out.println(-1);
    } main {
        Scanner stdIn = new Scanner(System.in);
        int a = Integer.parseInt(stdIn.next());
        int b = Integer.parseInt(stdIn.next());

        int pl = 0;
        int pr = 1250;
        do {
            int pc = (pl + pr) / 2;
            if ((int)(pc * 0.08) == a && (int)(pc * 0.1) == b) {
                while ((int)(pc * 0.08) == a && (int)(pc * 0.1) == b) {
                    pc--;
                }
                pc++;
                System.out.println(pc);
                return;
            } else if ((int)(pc * 0.08) < a || (int)(pc * 0.1) < b) {
                pl = pc + 1;
            } else if ((int)(pc * 0.08) > a || (int)(pc * 0.1) > b) {
                pr = pc - 1;
            }
        } while (pl <= pr);

        System.out.println(-1);
    } Scanner stdIn = new Scanner(System.in); stdIn new Scanner(System.in) int a = Integer.parseInt(stdIn.next()); a Integer.parseInt(stdIn.next()) Integer.parseInt Integer stdIn.next() stdIn.next stdIn int b = Integer.parseInt(stdIn.next()); b Integer.parseInt(stdIn.next()) Integer.parseInt Integer stdIn.next() stdIn.next stdIn int pl = 0; pl 0 int pr = 1250; pr 1250 do {
            int pc = (pl + pr) / 2;
            if ((int)(pc * 0.08) == a && (int)(pc * 0.1) == b) {
                while ((int)(pc * 0.08) == a && (int)(pc * 0.1) == b) {
                    pc--;
                }
                pc++;
                System.out.println(pc);
                return;
            } else if ((int)(pc * 0.08) < a || (int)(pc * 0.1) < b) {
                pl = pc + 1;
            } else if ((int)(pc * 0.08) > a || (int)(pc * 0.1) > b) {
                pr = pc - 1;
            }
        } while (pl <= pr); pl <= pr pl pr {
            int pc = (pl + pr) / 2;
            if ((int)(pc * 0.08) == a && (int)(pc * 0.1) == b) {
                while ((int)(pc * 0.08) == a && (int)(pc * 0.1) == b) {
                    pc--;
                }
                pc++;
                System.out.println(pc);
                return;
            } else if ((int)(pc * 0.08) < a || (int)(pc * 0.1) < b) {
                pl = pc + 1;
            } else if ((int)(pc * 0.08) > a || (int)(pc * 0.1) > b) {
                pr = pc - 1;
            }
        } int pc = (pl + pr) / 2; pc (pl + pr) / 2 (pl + pr) pl pr 2 if ((int)(pc * 0.08) == a && (int)(pc * 0.1) == b) {
                while ((int)(pc * 0.08) == a && (int)(pc * 0.1) == b) {
                    pc--;
                }
                pc++;
                System.out.println(pc);
                return;
            } else if ((int)(pc * 0.08) < a || (int)(pc * 0.1) < b) {
                pl = pc + 1;
            } else if ((int)(pc * 0.08) > a || (int)(pc * 0.1) > b) {
                pr = pc - 1;
            } (int)(pc * 0.08) == a && (int)(pc * 0.1) == b (int)(pc * 0.08) == a (int)(pc * 0.08) pc 0.08 a (int)(pc * 0.1) == b (int)(pc * 0.1) pc 0.1 b {
                while ((int)(pc * 0.08) == a && (int)(pc * 0.1) == b) {
                    pc--;
                }
                pc++;
                System.out.println(pc);
                return;
            } while ((int)(pc * 0.08) == a && (int)(pc * 0.1) == b) {
                    pc--;
                } (int)(pc * 0.08) == a && (int)(pc * 0.1) == b (int)(pc * 0.08) == a (int)(pc * 0.08) pc 0.08 a (int)(pc * 0.1) == b (int)(pc * 0.1) pc 0.1 b {
                    pc--;
                } pc-- pc pc++ pc System.out.println(pc) System.out.println System.out System System.out pc return; if ((int)(pc * 0.08) < a || (int)(pc * 0.1) < b) {
                pl = pc + 1;
            } else if ((int)(pc * 0.08) > a || (int)(pc * 0.1) > b) {
                pr = pc - 1;
            } (int)(pc * 0.08) < a || (int)(pc * 0.1) < b (int)(pc * 0.08) < a (int)(pc * 0.08) pc 0.08 a (int)(pc * 0.1) < b (int)(pc * 0.1) pc 0.1 b {
                pl = pc + 1;
            } pl = pc + 1 pl pc + 1 pc 1 if ((int)(pc * 0.08) > a || (int)(pc * 0.1) > b) {
                pr = pc - 1;
            } (int)(pc * 0.08) > a || (int)(pc * 0.1) > b (int)(pc * 0.08) > a (int)(pc * 0.08) pc 0.08 a (int)(pc * 0.1) > b (int)(pc * 0.1) pc 0.1 b {
                pr = pc - 1;
            } pr = pc - 1 pr pc - 1 pc 1 System.out.println(-1) System.out.println System.out System System.out -1 1 String[] args args
import java.util.Scanner;

class Main {
    public static void main(String[] args) {
        Scanner stdIn = new Scanner(System.in);
        int a = Integer.parseInt(stdIn.next());
        int b = Integer.parseInt(stdIn.next());

        int pl = 0;
        int pr = 1250;
        do {
            int pc = (pl + pr) / 2;
            if ((int)(pc * 0.08) == a && (int)(pc * 0.1) == b) {
                while ((int)(pc * 0.08) == a && (int)(pc * 0.1) == b) {
                    pc--;
                }
                pc++;
                System.out.println(pc);
                return;
            } else if ((int)(pc * 0.08) < a || (int)(pc * 0.1) < b) {
                pl = pc + 1;
            } else if ((int)(pc * 0.08) > a || (int)(pc * 0.1) > b) {
                pr = pc - 1;
            }
        } while (pl <= pr);

        System.out.println(-1);
    }
}
