#include <iostream> using namespace std; typedef long long ll; int main() { ll t,x,c=0; cin>>t; for(ll i=0;i<t;i++){ for(ll j=0;j<t;j++){ cin>>x; if(i>j&&x!=0)c++; } } if(!c)cout<<"YES"; else cout<<"NO"; } // 64 位输出请用 printf("%l...