The objective of a Sudoku game is to fill a 9×9 array with digits (1-9) so that each column, each row, and each of the nine 3×3 subarrays contain all digits from 1 to 9 as in the figure below.
Write a program that checks whether or not the user input is a Sudoku answer and outputs ‘yes’ or ‘no’.
1 9 3 2 6 5 4 7 8
7 8 2 3 1 4 9 5 6
4 5 6 9 7 8 1 3 2
2 3 4 8 5 1 6 9 7
9 6 5 4 3 7 2 8 1
8 7 1 6 9 2 3 4 5
3 1 9 5 8 6 7 2 4
5 2 7 1 4 3 8 6 9
6 4 8 7 2 9 5 1 3
yes