#include <iostream>//cout<<right で右揃え
#include <iomanip>//cout<<setw(数字) で空白による桁揃え
#include <string>
#include <vector>
#include <queue>
#include <deque>
#include <algorithm>
#include <cstdlib>//abs()で整数絶対値
#include <cmath>//abs()かfabs()で少数絶対値
#include <functional>//sort第三引数greater<>()で降順
#include <map>

#define rep(i, n) for(int i=0, i##_len=(n); i<i##_len; i++)
#define ALL(x) (x).begin(),(x).end()
using namespace std;
using ll = long long int;

int main(){
    string s;cin>>s;
    vector<int> a(4);
    int ans = 0; 
    rep(i,10000){
        int b = i;
        a[3] = b / 1000;
        b %= 1000;
        a[2] = b / 100;
        b %= 100;
        a[1] = b / 10;
        b %= 10;
        a[0] = b;
        bool flag = false;
        rep(i,4) if(s[a[i]]=='x') flag = true;
        if(flag) continue;

        vector<int> c(10);
        rep(i,4) c[a[i]]++;
        rep(i,10) if(s[i]=='o'&&c[i]==0) flag = true;
        if(flag) continue;

        ans++;
    }
    cout << ans << endl;
    return 0;
}
#include <bits/stdc++.h>
using namespace std;
//*************************MACROS*************************
#define endl "\n"
#define MOD = 1000000007

#define rep(i, k, n) for (i = k; i < n; ++i)
#define repr(i, k, n) for (i = n; i >= k; i--)
#define debug(x, y) cout << x << " : " << y << endl;
#define debugarr(arr, i, n) \
  for (i = 0; i < n; i++)   \
    cout << arr[i] << " ";  \
  cout << endl;
//*************************MACROS*************************


int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
  int n;
  cin>>n;
  vector<int> arr(n);
  int i;
  rep(i,0,n)
  cin>>arr[i];
  sort(arr.begin(),arr.end());
  rep(i,0,n)
    if(arr[i]!=i+1){
        cout<<"No"<<endl;
        return 0;
    }
  cout<<"Yes"<<endl;
  return 0;
}