{"raw_statement":[{"iden":"statement","content":"Sudoku is a popular number puzzle involving placing digits (1-9) in a 9 by 9 grid. A sudoku is considered _valid_ if all of the following are true:\n\n-All digits are integers from 1 to 9\n\n-No number occurs in the same row twice\n\n-No number occurs in the same column twice\n\n-No number occurs in the same 3 by 3 box twice.\n\nGiven a sudoku board, print whether or not it is valid.\n\nThe input consists of nine lines, each containing nine space-separated integers ranging from 1 to 9.\n\nIf the sudoku is valid, output VALID, otherwise output INVALID.\n\n"},{"iden":"input","content":"The input consists of nine lines, each containing nine space-separated integers ranging from 1 to 9."},{"iden":"output","content":"If the sudoku is valid, output VALID, otherwise output INVALID."},{"iden":"examples","content":"Input1 2 3 4 5 6 7 8 9\n4 5 6 7 8 9 1 2 3\n7 8 9 1 2 3 4 5 6\n2 3 1 5 6 4 8 9 7\n5 6 4 8 9 7 2 3 1\n8 9 7 2 3 1 5 6 4\n3 1 2 6 4 5 9 7 8\n6 4 5 9 7 8 3 1 2\n9 7 8 3 1 2 6 4 5\nOutputVALID\nInput1 1 1 1 1 1 1 1 1\n2 2 2 2 2 2 2 2 2\n3 3 3 3 3 3 3 3 3\n4 4 4 4 4 4 4 4 4\n5 5 5 5 5 5 5 5 5\n6 6 6 6 6 6 6 6 6\n7 7 7 7 7 7 7 7 7\n8 8 8 8 8 8 8 8 8\n9 9 9 9 9 9 9 9 9\nOutputINVALID\n"}],"translated_statement":null,"sample_group":[],"show_order":[],"formal_statement":"**Definitions**  \nLet $ G \\in \\{1, 2, \\dots, 9\\}^{9 \\times 9} $ be a 9×9 grid representing the Sudoku board.\n\n**Constraints**  \n1. For all $ i, j \\in \\{1, \\dots, 9\\} $, $ 1 \\le G[i][j] \\le 9 $.  \n2. For each row $ i \\in \\{1, \\dots, 9\\} $, the elements $ G[i][1], G[i][2], \\dots, G[i][9] $ are distinct.  \n3. For each column $ j \\in \\{1, \\dots, 9\\} $, the elements $ G[1][j], G[2][j], \\dots, G[9][j] $ are distinct.  \n4. For each 3×3 box $ (b_r, b_c) \\in \\{0,1,2\\} \\times \\{0,1,2\\} $, the set  \n   $$\n   \\{ G[3b_r + r][3b_c + c] \\mid r, c \\in \\{1,2,3\\} \\}\n   $$  \n   contains distinct elements.\n\n**Objective**  \nOutput \"VALID\" if all constraints hold; otherwise, output \"INVALID\".","simple_statement":"Given a 9x9 sudoku grid, check if it's valid.  \nValid means: each row, each column, and each 3x3 box contains digits 1-9 with no duplicates.  \nPrint \"VALID\" if it's valid, otherwise print \"INVALID\".","has_page_source":false}