CF632F Magic Matrix

Description

You're given a matrix $ A $ of size $ n×n $ . Let's call the matrix with nonnegative elements magic if it is symmetric (so $ a_{ij}=a_{ji} $ ), $ a_{ii}=0 $ and $ a_{ij}

Input Format

The first line contains integer $ n $ ( $ 1

Output Format

Print ''MAGIC" (without quotes) if the given matrix $ A $ is magic. Otherwise print ''NOT MAGIC".