CodeLab Academy 📞 9936 6696
← List Python · Level 8: Nested loops Code · 80 points ← #769 #771 →

#770. Knight moves

A chess knight stands on the square (x, y) (1-8). How many moves can it make without leaving the board? ### Input One line: x y. ### Output A number.

Examples

Input
8 8
Output
2
Input
6 2
Output
6

💡 You can solve it with Python, JavaScript or blocks. Read the input line by line with input(). Don't print a question (like input("Number: ")). Print exactly what the output asks for, nothing more.

🔒 You can solve the first 3 problems without an account. Sign up for free to solve this one!