
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();

        int roop = 0;
        // 最小から求める
        while (roop < 10000) {
            if (Math.floor((double) roop * 0.08) == a && Math.floor((double) roop * 0.1) == b) {
                System.out.println(roop);
                break;
            }
            roop++;
        }

        if (roop == 10000) {
            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();

        int roop = 0;
        // 最小から求める
        while (roop < 10000) {
            if (Math.floor((double) roop * 0.08) == a && Math.floor((double) roop * 0.1) == b) {
                System.out.println(roop);
                break;
            }
            roop++;
        }

        if (roop == 10000) {
            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();

        int roop = 0;
        // 最小から求める
        while (roop < 10000) {
            if (Math.floor((double) roop * 0.08) == a && Math.floor((double) roop * 0.1) == b) {
                System.out.println(roop);
                break;
            }
            roop++;
        }

        if (roop == 10000) {
            System.out.println(-1);
        }

    } main {
        Scanner sc = new Scanner(System.in);
        // 数値の入力
        int a = sc.nextInt();
        int b = sc.nextInt();

        int roop = 0;
        // 最小から求める
        while (roop < 10000) {
            if (Math.floor((double) roop * 0.08) == a && Math.floor((double) roop * 0.1) == b) {
                System.out.println(roop);
                break;
            }
            roop++;
        }

        if (roop == 10000) {
            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 int roop = 0; roop 0 while (roop < 10000) {
            if (Math.floor((double) roop * 0.08) == a && Math.floor((double) roop * 0.1) == b) {
                System.out.println(roop);
                break;
            }
            roop++;
        } roop < 10000 roop 10000 {
            if (Math.floor((double) roop * 0.08) == a && Math.floor((double) roop * 0.1) == b) {
                System.out.println(roop);
                break;
            }
            roop++;
        } if (Math.floor((double) roop * 0.08) == a && Math.floor((double) roop * 0.1) == b) {
                System.out.println(roop);
                break;
            } Math.floor((double) roop * 0.08) == a && Math.floor((double) roop * 0.1) == b Math.floor((double) roop * 0.08) == a Math.floor((double) roop * 0.08) Math.floor Math (double) roop * 0.08 (double) roop 0.08 a Math.floor((double) roop * 0.1) == b Math.floor((double) roop * 0.1) Math.floor Math (double) roop * 0.1 (double) roop 0.1 b {
                System.out.println(roop);
                break;
            } System.out.println(roop) System.out.println System.out System System.out roop break; roop++ roop if (roop == 10000) {
            System.out.println(-1);
        } roop == 10000 roop 10000 {
            System.out.println(-1);
        } 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();

        int roop = 0;
        // 最小から求める
        while (roop < 10000) {
            if (Math.floor((double) roop * 0.08) == a && Math.floor((double) roop * 0.1) == b) {
                System.out.println(roop);
                break;
            }
            roop++;
        }

        if (roop == 10000) {
            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();

        int roop = 0;
        // 最小から求める
        while (roop < 10000) {
            if (Math.floor((double) roop * 0.08) == a && Math.floor((double) roop * 0.1) == b) {
                System.out.println(roop);
                break;
            }
            roop++;
        }

        if (roop == 10000) {
            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();

        int roop = 0;
        // 最小から求める
        while (roop < 10000) {
            if (Math.floor((double) roop * 0.08) == a && Math.floor((double) roop * 0.1) == b) {
                System.out.println(roop);
                break;
            }
            roop++;
        }

        if (roop == 10000) {
            System.out.println(-1);
        }

    }
}
