import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int a =scan.nextInt();
        int b = scan.nextInt();

        int i = 1;
        int ans = -1;
        while(true) {
        	int tempA = (i * 8) / 100;
        	int tempB = i / 10;

        	if(tempA == a && tempB ==b) {
        		ans = i;
        		break;
        	}
        	if(tempA > a || tempB > b) {
        		break;
        	}
        	i++;
        }
        System.out.println(ans);
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int a =scan.nextInt();
        int b = scan.nextInt();

        int i = 1;
        int ans = -1;
        while(true) {
        	int tempA = (i * 8) / 100;
        	int tempB = i / 10;

        	if(tempA == a && tempB ==b) {
        		ans = i;
        		break;
        	}
        	if(tempA > a || tempB > b) {
        		break;
        	}
        	i++;
        }
        System.out.println(ans);
    }
} Main public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int a =scan.nextInt();
        int b = scan.nextInt();

        int i = 1;
        int ans = -1;
        while(true) {
        	int tempA = (i * 8) / 100;
        	int tempB = i / 10;

        	if(tempA == a && tempB ==b) {
        		ans = i;
        		break;
        	}
        	if(tempA > a || tempB > b) {
        		break;
        	}
        	i++;
        }
        System.out.println(ans);
    } main {
        Scanner scan = new Scanner(System.in);
        int a =scan.nextInt();
        int b = scan.nextInt();

        int i = 1;
        int ans = -1;
        while(true) {
        	int tempA = (i * 8) / 100;
        	int tempB = i / 10;

        	if(tempA == a && tempB ==b) {
        		ans = i;
        		break;
        	}
        	if(tempA > a || tempB > b) {
        		break;
        	}
        	i++;
        }
        System.out.println(ans);
    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int a =scan.nextInt(); a scan.nextInt() scan.nextInt scan int b = scan.nextInt(); b scan.nextInt() scan.nextInt scan int i = 1; i 1 int ans = -1; ans -1 1 while(true) {
        	int tempA = (i * 8) / 100;
        	int tempB = i / 10;

        	if(tempA == a && tempB ==b) {
        		ans = i;
        		break;
        	}
        	if(tempA > a || tempB > b) {
        		break;
        	}
        	i++;
        } true {
        	int tempA = (i * 8) / 100;
        	int tempB = i / 10;

        	if(tempA == a && tempB ==b) {
        		ans = i;
        		break;
        	}
        	if(tempA > a || tempB > b) {
        		break;
        	}
        	i++;
        } int tempA = (i * 8) / 100; tempA (i * 8) / 100 (i * 8) i 8 100 int tempB = i / 10; tempB i / 10 i 10 if(tempA == a && tempB ==b) {
        		ans = i;
        		break;
        	} tempA == a && tempB ==b tempA == a tempA a tempB ==b tempB b {
        		ans = i;
        		break;
        	} ans = i ans i break; if(tempA > a || tempB > b) {
        		break;
        	} tempA > a || tempB > b tempA > a tempA a tempB > b tempB b {
        		break;
        	} break; i++ i System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int a =scan.nextInt();
        int b = scan.nextInt();

        int i = 1;
        int ans = -1;
        while(true) {
        	int tempA = (i * 8) / 100;
        	int tempB = i / 10;

        	if(tempA == a && tempB ==b) {
        		ans = i;
        		break;
        	}
        	if(tempA > a || tempB > b) {
        		break;
        	}
        	i++;
        }
        System.out.println(ans);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int a =scan.nextInt();
        int b = scan.nextInt();

        int i = 1;
        int ans = -1;
        while(true) {
        	int tempA = (i * 8) / 100;
        	int tempB = i / 10;

        	if(tempA == a && tempB ==b) {
        		ans = i;
        		break;
        	}
        	if(tempA > a || tempB > b) {
        		break;
        	}
        	i++;
        }
        System.out.println(ans);
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int a =scan.nextInt();
        int b = scan.nextInt();

        int i = 1;
        int ans = -1;
        while(true) {
        	int tempA = (i * 8) / 100;
        	int tempB = i / 10;

        	if(tempA == a && tempB ==b) {
        		ans = i;
        		break;
        	}
        	if(tempA > a || tempB > b) {
        		break;
        	}
        	i++;
        }
        System.out.println(ans);
    }
}
