#include using namespace std; using ll=long long; using pii=pair; #define all(a) a.begin(),a.end() #define pb push_back #define sz(a) ((int)a.size()) int cnt[10]; signed main(){ ios_base::sync_with_stdio(0),cin.tie(0); int n; cin >> n; for(int i=0; i> x; cnt[x]++;} ll res=0; for(int i=1; i<=8; ++i) for(int j=1; j<=8; ++j){ int de=1; for(int k=0; k