import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner= new Scanner(System.in);
        int tax8 = scanner.nextInt();
        int tax10 = scanner.nextInt();
        int price = 0;
        if (20 < (tax10 - tax8) || (tax10- tax8) < 0) {
            price = -1;
        } else {
            for(int i = 0; i <= 9; i++) {
                int pPrice10 = tax10 * 10;
                int p10 = (int) ((pPrice10 + i)* 0.08);
                if(tax8 != p10) {
                    price = -1;
                    continue;
                } else {
                    price = pPrice10 + i;
                    break;
                }
            }
        }
        System.out.println(price);
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner scanner= new Scanner(System.in);
        int tax8 = scanner.nextInt();
        int tax10 = scanner.nextInt();
        int price = 0;
        if (20 < (tax10 - tax8) || (tax10- tax8) < 0) {
            price = -1;
        } else {
            for(int i = 0; i <= 9; i++) {
                int pPrice10 = tax10 * 10;
                int p10 = (int) ((pPrice10 + i)* 0.08);
                if(tax8 != p10) {
                    price = -1;
                    continue;
                } else {
                    price = pPrice10 + i;
                    break;
                }
            }
        }
        System.out.println(price);
    }
} Main public static void main(String[] args) {
        Scanner scanner= new Scanner(System.in);
        int tax8 = scanner.nextInt();
        int tax10 = scanner.nextInt();
        int price = 0;
        if (20 < (tax10 - tax8) || (tax10- tax8) < 0) {
            price = -1;
        } else {
            for(int i = 0; i <= 9; i++) {
                int pPrice10 = tax10 * 10;
                int p10 = (int) ((pPrice10 + i)* 0.08);
                if(tax8 != p10) {
                    price = -1;
                    continue;
                } else {
                    price = pPrice10 + i;
                    break;
                }
            }
        }
        System.out.println(price);
    } main {
        Scanner scanner= new Scanner(System.in);
        int tax8 = scanner.nextInt();
        int tax10 = scanner.nextInt();
        int price = 0;
        if (20 < (tax10 - tax8) || (tax10- tax8) < 0) {
            price = -1;
        } else {
            for(int i = 0; i <= 9; i++) {
                int pPrice10 = tax10 * 10;
                int p10 = (int) ((pPrice10 + i)* 0.08);
                if(tax8 != p10) {
                    price = -1;
                    continue;
                } else {
                    price = pPrice10 + i;
                    break;
                }
            }
        }
        System.out.println(price);
    } Scanner scanner= new Scanner(System.in); scanner new Scanner(System.in) int tax8 = scanner.nextInt(); tax8 scanner.nextInt() scanner.nextInt scanner int tax10 = scanner.nextInt(); tax10 scanner.nextInt() scanner.nextInt scanner int price = 0; price 0 if (20 < (tax10 - tax8) || (tax10- tax8) < 0) {
            price = -1;
        } else {
            for(int i = 0; i <= 9; i++) {
                int pPrice10 = tax10 * 10;
                int p10 = (int) ((pPrice10 + i)* 0.08);
                if(tax8 != p10) {
                    price = -1;
                    continue;
                } else {
                    price = pPrice10 + i;
                    break;
                }
            }
        } 20 < (tax10 - tax8) || (tax10- tax8) < 0 20 < (tax10 - tax8) 20 (tax10 - tax8) tax10 tax8 (tax10- tax8) < 0 (tax10- tax8) tax10 tax8 0 {
            price = -1;
        } price = -1 price -1 1 {
            for(int i = 0; i <= 9; i++) {
                int pPrice10 = tax10 * 10;
                int p10 = (int) ((pPrice10 + i)* 0.08);
                if(tax8 != p10) {
                    price = -1;
                    continue;
                } else {
                    price = pPrice10 + i;
                    break;
                }
            }
        } for(int i = 0; i <= 9; i++) {
                int pPrice10 = tax10 * 10;
                int p10 = (int) ((pPrice10 + i)* 0.08);
                if(tax8 != p10) {
                    price = -1;
                    continue;
                } else {
                    price = pPrice10 + i;
                    break;
                }
            } int i = 0; int i = 0; i 0 i <= 9 i 9 i++ i++ i {
                int pPrice10 = tax10 * 10;
                int p10 = (int) ((pPrice10 + i)* 0.08);
                if(tax8 != p10) {
                    price = -1;
                    continue;
                } else {
                    price = pPrice10 + i;
                    break;
                }
            } {
                int pPrice10 = tax10 * 10;
                int p10 = (int) ((pPrice10 + i)* 0.08);
                if(tax8 != p10) {
                    price = -1;
                    continue;
                } else {
                    price = pPrice10 + i;
                    break;
                }
            } int pPrice10 = tax10 * 10; pPrice10 tax10 * 10 tax10 10 int p10 = (int) ((pPrice10 + i)* 0.08); p10 (int) ((pPrice10 + i)* 0.08) (pPrice10 + i) pPrice10 i 0.08 if(tax8 != p10) {
                    price = -1;
                    continue;
                } else {
                    price = pPrice10 + i;
                    break;
                } tax8 != p10 tax8 p10 {
                    price = -1;
                    continue;
                } price = -1 price -1 1 continue; {
                    price = pPrice10 + i;
                    break;
                } price = pPrice10 + i price pPrice10 + i pPrice10 i break; System.out.println(price) System.out.println System.out System System.out price String[] args args public class Main {
    public static void main(String[] args) {
        Scanner scanner= new Scanner(System.in);
        int tax8 = scanner.nextInt();
        int tax10 = scanner.nextInt();
        int price = 0;
        if (20 < (tax10 - tax8) || (tax10- tax8) < 0) {
            price = -1;
        } else {
            for(int i = 0; i <= 9; i++) {
                int pPrice10 = tax10 * 10;
                int p10 = (int) ((pPrice10 + i)* 0.08);
                if(tax8 != p10) {
                    price = -1;
                    continue;
                } else {
                    price = pPrice10 + i;
                    break;
                }
            }
        }
        System.out.println(price);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner scanner= new Scanner(System.in);
        int tax8 = scanner.nextInt();
        int tax10 = scanner.nextInt();
        int price = 0;
        if (20 < (tax10 - tax8) || (tax10- tax8) < 0) {
            price = -1;
        } else {
            for(int i = 0; i <= 9; i++) {
                int pPrice10 = tax10 * 10;
                int p10 = (int) ((pPrice10 + i)* 0.08);
                if(tax8 != p10) {
                    price = -1;
                    continue;
                } else {
                    price = pPrice10 + i;
                    break;
                }
            }
        }
        System.out.println(price);
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner= new Scanner(System.in);
        int tax8 = scanner.nextInt();
        int tax10 = scanner.nextInt();
        int price = 0;
        if (20 < (tax10 - tax8) || (tax10- tax8) < 0) {
            price = -1;
        } else {
            for(int i = 0; i <= 9; i++) {
                int pPrice10 = tax10 * 10;
                int p10 = (int) ((pPrice10 + i)* 0.08);
                if(tax8 != p10) {
                    price = -1;
                    continue;
                } else {
                    price = pPrice10 + i;
                    break;
                }
            }
        }
        System.out.println(price);
    }
}