#include <bits/stdc++.h>
using namespace std;

int main() {
    int N;
    std::string A,B;
    std::cin>>N;
    std::cin>>A;
    std::vector<string> S;
    for(int i=0; i<N; i++){
        string B=A.substr(i,1);
        S.push_back(B);
    }
    sort(S.begin(), S.end());
    S.erase(unique(S.begin(), S.end()), S.end());
    if (S.size() < 3) {
        std::cout << "No";
    }else{
        std::cout << "Yes";
    }
    return 0;
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: