NHANTINH


Submit solution

Points: 100
Time limit: 1.0s
Memory limit: 493M

Problem type

Comments


  • -4
    10Tin_GiaAn  commented on July 22, 2024, 7:27 a.m.

    include <bits/stdc++.h>

    using namespace std; long long n,a[100000+7]; int main() {
    cin>>n; for(int i=1;i<=n;i++) cin>>a[i]; for(int i=1;i<=n;i++) for(int j=1;j<=n/i;j++) if(ij<=n and a[ij]!=a[i]*a[j]) { cout<<"NO"; return 0; } cout<<"YES"; }