讨厌中南大学的题。。
#include<bits/stdc++.h>
using namespace std;
string s;
bool sp[4];
int main()
{
while((cin >> s))
{
if(s.size() < 8)
{
cout << "NO" << endl;
continue;
}
memset(sp, false, sizeof sp);
for(auto x : s)
{
if(x >= '0' && x <= '9') sp[0] = true;
else if(x >= 'a' && x <= 'z') sp[1] = true;
else if(x >= 'A' && x <= 'Z') sp[2] = true;
else sp[3] = true;
}
int cnt = 0;
for(int i = 0; i < 4; i ++) cnt += sp[i];
if(cnt >= 3) cout << "YES" << endl;
else cout << "NO" << endl;
}
}