A necklace can be described as a string of links ('-') and pearls ('o'), with the last link or pearl connected to the first one.  You can remove a link or a pearl and insert it between two other existing links or pearls (or between a link and a pearl) on the necklace. This process can be repeated as many times as you like, but you can't throw away any parts.Can you make the number of links between every two adjacent pearls equal? Two pearls are considered to be adjacent if there is no other pearl between them.Note that the final necklace should remain as one circular part of the same length as the initial necklace.

The only line of input contains a string $$$s$$$ ($$$3 \leq |s| \leq 100$$$), representing the necklace, where a dash '-' represents a link and the lowercase English letter 'o' represents a pearl.

Print "YES" if the links and pearls can be rejoined such that the number of links between adjacent pearls is equal. Otherwise print "NO". You can print each letter in any case (upper or lower).

#include <bits/stdc++.h>
using namespace std;
char s[10005];
int main()
{
    int n,a=0,b=0,i;
    scanf("%s",s);
    n=strlen(s);
    for(i=0;i<n;i++)
    {
        if(s[i]=='-')
            a++;
        if(s[i]=='o')
            b++;
    }
    if(b==0)
        printf("YES");
    else if(a%b==0)
        printf("YES");
    else
        printf("NO");
    return 0;
}

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

int main()
{
  ios_base::sync_with_stdio(false);
  cin.tie(NULL); cout.tie(NULL);

  string str;  cin>>str;

  int x=count(str.begin(),str.end(),'-');
  int y=count(str.begin(),str.end(),'o');

  //cout<<"x "<<x<<" y "<<y<<endl;

  if( y==0 || x==0)
  cout<<"YES"<<endl;
  else if(x<y)
  cout<<"NO"<<endl;
  else if( x%y==0 )
  cout<<"YES"<<endl;
  else cout<<"NO"<<endl;

  /*if(y==0 )
  cout<<"YES"<<endl;
  else if( x==2*y )
  cout<<"YES"<<endl;
  else if(y==1)
  cout<<"YES"<<endl;
  else if(x%2!=0 )
  cout<<"NO"<<endl;
  else if( y!=0 && x==0)
  cout<<"YES"<<endl;
  else if( y%2!=0 && y!=1)
  cout<<"NO"<<endl;
  else if(x==y)
  cout<<"YES"<<endl;*/

  return 0;
}

//author Eterna
#include<iostream>
#include<algorithm>
#include<cstdio>
#include<string>
#include<cstring>
#include<vector>
#include<map>
#include<set>
#include<queue>
#include<stack>
#include<utility>
#include<cmath>
#include<climits>
#include<deque>
#include<functional>
#define max(a,b) (a>b?a:b)
#define min(a,b) (a<b?a:b)
#define INF 0x7f7f7f7f
#define maxn 100000
#define eps 1e-15
#define MOD ((int)(1e9+7))
#define ABS(x) ((x)>=0?(x):(-(x)))
#define pb(x) push_back(x)
#define lowbit(x) (x&-x)
#define mid (L+R)/2
#define Lson (index*2)
#define Rson (index*2+1)
using namespace std;
typedef long long ll;
inline int read()
{
	char c;
	int ret = 0, sgn = 1;
	do { c = getchar(); } while ((c < '0' || c > '9') && c != '-');
	if (c == '-') sgn = -1; else ret = c - '0';
	while ((c = getchar()) >= '0' && c <= '9') ret = ret * 10 + (c - '0');
	return sgn * ret;
}
string line;
int anso, ans1;
int main(void) {
	cin >> line;
	for (int i = 0; i < line.size(); i++){
		if (line[i] == 'o')anso++;
		else ans1++;
	}
	if (ans1 == 0 || anso == 0)cout << "YES" << endl;
	else if (ans1%anso == 0)cout << "YES" << endl;
	else cout << "NO" << endl;
	//system("pause");
	return 0;
}

#include<bits/stdc++.h>
using namespace std;
int main()
{
	ios::sync_with_stdio(0);
    char a;
    int o=0,k=0;
    while(cin>>a)
    {
        if(a=='o')o++;
        else if(a=='-')k++;
    }
    if(o==0)
    {
        cout<<"YES"<<endl;
        exit(0);
    }
    if(k%o==0)cout<<"YES"<<endl;
	else cout<<"NO"<<endl;
    return 0;
}

#include <stdio.h>
#include <iostream>
#include <string>
using namespace std;

int main() {
    string s;
    cin >> s;
    int cnt1 = 0;
    int cnt2 = 0;
    for(int i = 0; i < s.length(); i++) {
        if(s[i] == '-') {
            cnt1++;
        } else {
            cnt2++;
        }
    }
    if(cnt2 == 0) {
        printf("YES");
        return 0;
    }
    if(cnt1 % cnt2 == 0) {
        printf("YES");
    } else {
        printf("NO");
    }
    return 0;
}

#include<bits/stdc++.h>
using namespace std;
char s[110];
int l,p,n;
int main() {
	scanf("%s",s+1);
	n=strlen(s+1);
	for(int i=1; i<=n; i++) {
		if(s[i]=='-') l++;
		if(s[i]=='o') p++;
	}
	if(p==0) cout<<"YES";
	else if(l%p==0) cout<<"YES";
	else cout<<"NO";
}

#include<iostream>
using namespace std;
char a;int l1,l2;
int main(){
	while(cin>>a){
		if(a=='o') l1++;
		else l2++;
	}
	if(l1==0) {
		cout<<"YES";return 0;
	}
	if(l2%l1==0) cout<<"YES";
	else cout<<"NO";
	return 0;
}

#include <bits/stdc++.h>
using namespace std;
int main(){
int i,ans,c1=0,c2=0;
string a;
cin>>a;
for(i=0;i<a.size();i++)
{
	if(a[i]=='-')
	c1++;
	else
	c2++;
}
if(c1==0 || c2==0)
cout<<"YES";
else if(c1%c2==0 && c1>=c2)
cout<<"YES";
else
cout<<"NO";

}

#include <cstdio>
#include <cstring>
int main(){
    char necklace[110];
    int numOfPearl = 0;
    int numOfLink = 0;
    int i;
    scanf("%s",necklace);
    for(i = 0;i < strlen(necklace);i++){
        if(necklace[i] == 'o'){
            numOfPearl++;
            continue;
        }else if(necklace[i] == '-'){
            numOfLink++;
            continue;
        }
    }
    if(numOfPearl == 0){
    	printf("YES\n");
    	return 0;
	}
    if((numOfLink % numOfPearl == 0 || numOfLink == 0)){
        printf("YES\n");
    }else{
        printf("NO\n");
    }
    return 0;
}

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

int main()
{
    string s;
    cin>>s;
    int links = 0, pearls = 0;
    for(unsigned long i=0;i<s.length();i++){
        if(s[i]=='-')
            links++;
        else
            pearls++;
    }
    if(pearls && (links%pearls == 0))
        cout<<"YES"<<endl;
    else if(!pearls)
        cout<<"YES"<<endl;
    else
        cout<<"NO"<<endl;
    return 0;
}

#include <iostream>
#include <algorithm>

using namespace std;

string str;

int main()
{
    cin >> str;
    int p = count(str.begin(), str.end(), 'o');
    int l = count(str.begin(), str.end(), '-');
    cout << ((p == 0 || (l % p == 0)) ? "YES" : "NO");
    return 0;
}

#include<bits/stdc++.h>
using namespace std;
string s;
int main(){
 	cin>>s;
 	int n=s.size(),n1=0,n2=0;
 	for(int i=0;i<n;i++){
 		if(s[i]=='o'){
			n1++;
		}else if(s[i]=='-'){
			n2++;
		}
	}
 	if(n1==0){
	 	cout<<"YES";
	}else if(n2%n1==0){
		cout<<"YES";
	}else{
		cout<<"NO";
	}
 	return 0;
}

#include<bits/stdc++.h>
#define mst(a,b) memset(a,b,sizeof(a))
#define For(i, j, k) for(int i=(j);i<=(k);i++)
using namespace std;
inline int read()
{
    int num=0;
    char c=' ';
    bool flag=1;
    for(;c>'9'||c<'0';c=getchar()) if(c=='-') flag=0;
    for(;c>='0'&&c<='9';num=(num<<1)+(num<<3)+c-48,c=getchar());
    return flag?num:-num;
}
string s;
int c, li;
int main()
{
	cin >> s;
	int l = s.size();
	For(i, 0, l-1) {
		if(s[i] == 'o') {
			li++;
		} else {
			c++;
		}
	}
//	cout << li << endl;
	if(li == 0 || c % li == 0) {
		printf("YES\n");
	} else {
		printf("NO\n");
	}
	return 0;
}

#include <bits/stdc++.h>

using namespace std;

int main()
{
    int c =0, p =0;
    string s;
    cin >> s;
    c = count(s.begin(), s.end(), '-');
    p = count(s.begin(), s.end(), 'o');

    if ( c != 0 && p != 0 && c % p != 0) printf("NO");
    else printf("YES");

    return 0;
}

#include <iostream>
#include <vector>
#include <set>
#include <map>
#include <cstring>
#include <stdio.h>
#include <iomanip>
#include <ctime>
#include <chrono>
#include <random>
#include <bitset>
#include <assert.h>
#define int long long
#define ld long double
#define fast ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)
#define all(c) (c).begin(), (c).end
#define sz(c) (c).size()
#define pb push_back
using namespace std;
mt19937 rnd(chrono::steady_clock::now().time_since_epoch().count());
const int N = 1e6 + 1, k = 4;
signed main() {
    fast;
    string s;
    cin >> s;
    int n = sz(s), cnt = 0;
    for (int i = 0; i < n; i++) {
        if(s[i] == 'o')
            cnt++;
    }
    if(cnt == 0 || ((n - cnt) >= cnt && (n - cnt) % cnt == 0) || n == cnt)
        cout << "YES";
    else
        cout << "NO";
}

#include<algorithm>
#include<iostream>
using namespace std;
main(){
          int i=0,j=0,m=0,n=0,k=0,t=0,p=0;
          string s;
          cin>>s;
          for(i=0;i<s.size();i++){
                       if(s[i]=='o'){n++;}
                       if(s[i]=='-'){m++;}
                       }

          if(n!=0  && m%n==0){ cout<<"YES"<<endl; }
          else if(n==0 && m!=0 || n==1  && m!=0  ){ cout<<"YES"<<endl; }
          else {cout<<"NO"<<endl;}
          }

#include<iostream>
using namespace std;
int main(){
    string s;
    cin>>s;
    int count=0;
    for(int i=0;i<s.length();i++)if(s[i]=='o')count++;

    if(count==0 || ((s.length()-count)%(count))==0){
        cout<<"YES";
    }
    else{
        cout<<"NO";
    }
}

#include <iostream>
#include <conio.h>
using namespace std;
int main()
{
    string s;
    int t=0, m=0;
    cin>>s;
    for(int i=0; i<s.size(); i++){
        if(s[i]=='-')
            t+=1;
        if(s[i]=='o')
            m+=1;
    }
    if(m==0||t%m==0)
        cout<<"YES";
    else
        cout<<"NO";

    return 0;
}

#include<iostream>
#include<stdio.h>
#include<cstring>

using namespace std;
int main()
{
     string s;
     cin>>s;
     int link=0,pearl=0,i;
          int len= s.length();
     for(i=0;i<len;i++)
     {
          if(s[i]=='o')
          pearl++;
          else if(s[i]=='-')
          link++;
     }
     if(pearl==0)
        cout<<"YES";
     else if(link%pearl==0)
     cout<<"YES";
     else
     cout<<"NO";
     return 0;
}

#include<bits/stdc++.h>
using namespace std;
#define ll            long long int
#define instr(n)      to_string(n)
#define setbits(x)    __builtin_popcountll(x)
#define nofzerobeg(x) __builtin_clz(x)
#define noofzeoend(x) __builtin_ctz(x)
#define parity(x)     __builtin_parity(x)
#define mod           1000000007
#define s(s)          s.size()
#define MIN           LLONG_MIN
#define pi            acos(1)
#define all(x)        x.begin(),x.end()
#define v(n)          vector<int> v(n)
#define w(x)          int x;cin>>x;while(x--)
#define ps(x,y)       fixed<<setprecision(y)<<x
#define f(i,j,n)      for(int i=j;i<=n;i++)
#define Fas           ios_base::sync_with_stdio(0);cin.tie(0);cin.tie(0);
int main(){  Fas;
       string s;
       cin>>s;
       int h=0,t=0;
       f(i,0,s.size()-1)
        {
            if(s[i]=='o')
            h++;
            else if(s[i]=='-')
            t++;
        }
        if(h==0 || t==0)
        {cout<<"YES";return 0;}
        if(t%h==0)
         cout<<"YES";
        else
        cout<<"NO";

}

#include <iostream>
using namespace std;

int main() {
	// your code goes here
	char ch[100];
	int d=0, o=0,i;
	cin>>ch;
	for(i=0;ch[i]!='\0';i++)
	{
		if(ch[i]=='-')
		d++;
		else
		o++;
	}

	if(o==0||d%o==0)
	cout<<"YES";
	else
	cout<<"NO";
	return 0;
}

#include<stdio.h>
#include<string.h>
int l,n1,n2;
char s[105];
int main(){
    gets(s);
    l=strlen(s);
    for(int i=0;i<l;i++)
        if(s[i]=='o')n1++;
        else if(s[i]=='-')n2++;
    if(n1==0)puts("YES");
    else if(n2%n1==0)puts("YES");
    else puts("NO");
    return 0;
}

#include <iostream>
#include <vector>
#include <queue>
#include <algorithm>
#include <cmath>
#include <string>

using namespace std;

int main()
{
	string s;
	cin >> s;
	int col1 = 0, col2 = 0;
	for (int i = 0; i < s.size(); i++)
	{
		if (s[i] == 'o')
		{
			col1++;
		}
		else
		{
			col2++;
		}
	}
	if (col1 == 0 || col2 == 0)
	{
		cout << "YES";
		return 0;
	}
	if (col2 % col1 == 0)
	{
		cout << "YES";
	}
	else
	{
		cout << "NO";
	}
}

#include <iostream>
#include <iomanip>
#include <cmath>
#include <vector>
#include <string>
using namespace std;
int main()
{
	string s;
	cin >> s;
	short n = 0;
	short b = 0;
	for (int i = 0; i < s.size(); i++) {
		if (s[i] == '-') n++;
		else b++;
	}
	//if ((n == 1)&&(b > 1)) cout << "NO";
//	else
		if (b == 0) cout << "YES";
	else if (n % b == 0) cout << "YES";
	else cout << "NO";
	return 0;
}

#include <bits/stdc++.h>
#define ll long long
#define pb push_back

using namespace std;
int main()
{
    vector < ll > v;
    float line=0,f=0;
    ll a,b;
    string s;
    cin>>s;
    ll siz=s.size();
    for(ll i = 0 ; i  < siz ; i++ )
    {
		if(s[i]=='o')
		 f++;
		 else
		  line++;
	  }
	  if(line==0||f==0){
		cout<<"YES";
		return 0;
	  }

       else if(line>=f)
        {
		   a=(ceil)(line/f);
		   b=(floor)(line/f);
        }
        if(a==b)
         cout<<"YES";
        else
         cout<<"NO";

    return 0;
 }

#include<iostream>
#include<string>
using namespace std;

string s;
int i,countL;

int main()
{
    cin>>s;
    for (int i=0; i<=s.length() ; i++)
        if (s[i]=='-') countL++;

        if (s.length()-countL==0) cout<<"YES";
        else
        if (countL%(s.length()-countL)==0) cout<<"YES";
        else cout<<"NO";

}

#include<bits/stdc++.h>
using namespace std;
int o,k;
char a;
int main(){
    while(cin>>a){
        if(a=='o') o++;
        else if(a=='-') k++;
    }
    if(o==0){
        cout<<"YES"<<endl;
        return 0;
    }
    if(k%o==0)
        cout<<"YES"<<endl;
    else
        cout<<"NO"<<endl;
    return 0;
}

#include <iostream>
#include <string>
using namespace std;

int main()
{
	string str;
	cin>>str;
	int pearls = 0,links = 0;
	for (int i=0; i<str.size(); i++)
		if (str[i] == 'o') pearls ++;
		else links ++;

	if (pearls == 0) cout<<"YES"<<endl;
	else {
		if (links % pearls == 0) cout<<"YES"<<endl;
		else cout<<"NO"<<endl;
	}
	return 0;
}

#include<iostream>
#include<string>
#include<cmath>
#include<cctype>
#include<vector>
#include<sstream>
using namespace std;
int main(){
	string s;
	cin>>s;
	int x=0,y=0;
	for(int i=0;i<s.length();i++){
		if(s[i]=='-'){
			x++;
		}
		if(s[i]=='o'){
			y++;
		}
	}
	if(y==0){
		cout<<"YES";
	}
	else{
	if(x%y==0){
		cout<<"YES";
	}
	else{
		cout<<"NO";
	}
}

	return 0;
}

#include<stdio.h>
#include<iostream>
#include<vector>
#include<deque>
#include<set>
#include<string.h>
#include<algorithm>
#include<limits.h>
#include<unordered_map>
#include<set>
using namespace std;
unordered_map<long long, int> mapcheck;
set<long long, int> setcheck;
long long n;
long long a[200010];

char str[20000];
int main() {

//	freopen("input.txt", "r", stdin);
	//freopen("output.txt", "w", stdout);

	scanf("%s", str + 1);
	n = strlen(str + 1);

	int pcnt = 0;
	int lcnt = 0;
	for (int i = 1; i <= n; i++) {
		if (str[i] == 'o') {
			pcnt++;
		}
	}

	if (pcnt == n) {
		cout << "YES" << endl;
		return 0;
	}

	if (pcnt == 0) {
		cout << "YES" << endl;
		return 0;
	}
	else if(pcnt == 1){
		cout << "YES" << endl;
		return 0;
	}
	else {
		if ((n - pcnt) % pcnt == 0) {
			cout << "YES" << endl;
		}
		else {
			cout << "NO" << endl;
		}

	}

}

#include<iostream>
#include <cstring>
using namespace std;
int main(void) {
	char s[101];
	int a=0, b=0, i;
	cin.getline(s,101);
	for (i = 0; i < strlen(s); ++i) {
		if (s[i] == '-')
			a++;
		if (s[i] == 'o')
			b++;
	}
	if (b==0||a%b == 0)
		cout<<"YES";
	else
		cout<<"NO";
	return 0;
}

#include<bits/stdc++.h>
using namespace std;
string st;
int sum1,sum2;
int main()
{
	cin>>st;
	for(int i=0;i<st.size();i++)
	{
		if(st[i]=='o') sum1++;
		else sum2++;
	}
	if(sum1==0) cout<<"YES";
	else if(sum2%sum1==0) cout<<"YES";
	else cout<<"NO";
	return 0;
}

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

int main()
{string word;
int countl=0,counto=0;
cin>>word;

for(int i=0 ;i<word.length() ;i++)
{
    if(word[i]=='-')
        countl++;
    if(word[i]=='o')
        counto++;
}

if(countl==0 || counto ==0 ||countl%counto==0)
    return cout<<"YES",0;

else
     return cout<<"NO",0;

}

#include <iostream>
#include <string>
using namespace std;
int main()
{
	int a = 0,b;
	string A;
	cin >> A;
	for (int i = 0; i < A.length(); i++)
	{
		if (A[i] == '-')
			a++;
	}
	b = A.length() - a;
	if (b != 0)
	{
		if (a%b == 0)
			cout << "YES";
		else
			cout << "NO";
	}
	else
		cout << "YES";
	return 0;
}

#include <stdio.h>
#include <stdlib.h>

int main()
{
    int i=0,p=0,l=0;
   char ch[101];
   scanf("%s",ch);
   while(ch[i]!='\0'){
    if(ch[i]=='o')p++;
    else l++;
    i++;
   }
     if(p==0){printf("YES");return 0;}
   if(l==0||p==1||l%p==0)printf("YES");
   else printf("NO");

    return 0;
}

#include<iostream>
using namespace std;

int main()
{
	int n=0, m=0;
	char c;
	while ((c = getchar()) != '\n')
	{
		if (c == '-')
			n++;
		else
			m++;
	}
	if (m <= 1)
		printf("YES\n");
	else
	{
		if (n % m == 0)
			printf("YES\n");
		else
			printf("NO\n");
	}
}

#include<bits/stdc++.h>
using namespace std;
int z,x;
string s;
int main()
{
	cin>>s;
	for(int i=0;i<s.size();i++)
	{
		if(s[i]=='o')z++;
		if(s[i]=='-')x++;
	}
	if(z==0){
		cout<<"YES"<<endl;
		return 0;
	}
	if(x%z==0)
	{
		cout<<"YES";
	}
	else
	{
		cout<<"NO";
	}
	cout<<endl;
	return 0;
}

#include <stdio.h>

char str[200];

int main()
{
	scanf("%s", &str);
	int i;
	int pearl = 0;
	int link = 0;
	for (i = 0; str[i]; ++i)
	{
		if (str[i] == 'o')
		{
			pearl++;
		}
		else if (str[i] == '-')
		{
			link++;
		}
	}

	if (pearl == 0)
	{
		printf("YES\n");
	}
	else
	{
		if (link % pearl == 0)
		{
			printf("YES\n");
		}
		else
		{
			printf("NO\n");
		}
	}
	return 0;
}

// CodeForces980A.cpp : Defines the entry point for the console application.
// http://codeforces.com/contest/980/problem/A

//#include "stdafx.h"

#include<iostream>
#include<cstdio>
#include<algorithm>
#include<vector>
#include<stack>
#include<set>
#include<queue>
#include<map>
#include<set>
#include<string>
#include<climits>
#include<cstring>
#include<iomanip>
using namespace std;

template<class T> void printVector(const vector<T>& res) {
	if (res.empty()) {
		cout << "Empty vector" << endl;
		return;
	}
	copy(res.begin(), res.end(), ostream_iterator<T>(std::cout, " "));
	cout << endl;
}

int main()
{
	string s;
	cin >> s;
	int pearls = 0, links = 0;
	for (auto au = s.begin(); au != s.end(); au++) {
		if ('-' == *au) links++;
		if ('o' == *au) pearls++;
	}
	if (0 == links) {
		cout << "YES" << endl;
		return 0;
	}
	if (1 >= pearls) {
		cout << "YES" << endl;
		return 0;
	}
	if (0 == links % pearls) {
		cout << "YES" << endl;
		return 0;
	}
	cout << "NO" << endl;
    return 0;
}

#include<iostream>
using namespace std;
int main(){

string s;
cin>>s;
int d=0,m=0;
long int l=s.length();
for(int i=0;i<l;i++){
    if(s[i]=='-')
    d++;
    else m++;
}
 if(m==0)
 cout<<"YES";
 else
{
    if((d-m)%2==0)
    {

            if(d%m==0) {cout<<"YES";}
            else {cout<<"NO";}

    }
    else if(m%2==0)
    cout<<"NO";
    else if(d%m==0)
    cout<<"YES";
    else cout<<"NO";
}

}

#include<stdio.h>

int main()
{
	char s[105];
	char temp;
	int pearls=0,links=0;

	do{
		scanf("%c",&temp);
		if(temp=='o')	pearls++;
		else if(temp=='-')	links++;
	}while(temp!='\n');

	if(pearls==0 || pearls==1 || links==0)	printf("YES\n");
	else if(pearls>links)	printf("NO\n");
	else if(links%pearls==0)	printf("YES\n");
	else	printf("NO\n");

	return 0;
}

#include <cstring>
#include <iostream>
#include <cstdio>
using namespace std;
char s[1000];
int main()
{
    int n, m;

    scanf("%s",s);
    int num = 0,len = strlen(s);
    for(int i = 0;i < len; i++)
    {
        if(s[i] == 'o')
            num++;
    }
    if(num == 0)    cout<<"YES"<<endl;
    else if((len-num)%num == 0)
        cout<<"YES"<<endl;
    else cout<<"NO"<<endl;
    return 0;
}

#include<bits/stdc++.h>
using namespace std;
#define ll long long int
int main()
{
	string s;
	cin>>s;
	ll len=s.length();

	ll c=0,d=0;
	for(ll i=0;i<len;i++){
		if(s[i]=='-') d++;
		else c++;
	}

	if(d==0||c==0||c==d){
		cout<<"YES"<<endl;
	}
	else {
		if(d>c&&d%c==0){
			cout<<"YES"<<endl;
		}
		else{
			cout<<"NO"<<endl;
		}
	}
}

#include <bits/stdc++.h>
using namespace std;
int main() {
string s;
int c1=0,c2=0;
    ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
    cin>>s;
    for (int i=0;i<s.size();++i)
    {
        if (s[i]=='-') ++c1;
        else ++c2;
}
if(c1==0 ||c2==0)
{
    cout <<"YES";
    return 0;
}
if(c1==1&& c2>2) {
        cout <<"NO";
return 0;}
if(c2>c1) {cout <<"NO";
return 0;
}
cout<<(c1%c2==0? "YES":"NO");
}

#include <iostream>
#include <cstring>
#include <cstdio>
using namespace std;

int main()
{
    int n=0,a=0,b=0;
    char ch[101];
    scanf("%s",ch);
    n=strlen(ch);
    for(int i=0;i<n;i++)
    {
        if(ch[i]=='-')
            a+=1;
        else
            b+=1;
    }
    if(a==0||b==0)
        printf("YES");
    else
    {
        if(a%b==0)
            printf("YES");
        else
            printf("NO");
    }
    return 0;
}

#include<bits/stdc++.h>
using namespace std;
int main()
{
    char a[107];
    scanf("%s",a);
    int l=strlen(a),x=0,o=0;

    for(int i=0; i<l; ++i)
    {
        if(a[i]=='o')++o;
        else ++x;
    }

    if(x>=o)
    {
        if(o==0)printf("YES\n");
        else if(x%o==0)printf("YES\n");
        else printf("NO\n");
    }
    else
    {
        if(x==0)printf("YES\n");
        else printf("NO\n");
    }
}

#include<bits/stdc++.h>
using namespace std;
int main(){
	string s;
    int a=0,b=0;
    cin>>s;
    for (int i=0;i<s.size();i++){
        if(s[i]=='-'){
        	a++;
		}else{
			b++;
		}
    }
    if (b==0){
    	cout<<"YES";
	}else if (a%b==0){
		cout<<"YES";
    }else{
        cout<<"NO";
    }
    return 0;
}

#include <iostream>
#include <string>

int main() {
	int a = 0, b = 0;
	std::string str;
	std::cin >> str;
	for (int i = 0; i < str.length(); i++) {
		if (str[i] == '-') a++;
		else b++;
	}
	if (a == 0 || b == 0) std::cout << "YES";
	else if (a % b == 0) {
		 	std::cout << "YES";
	}
	else std::cout << "NO";
	return 0;
}

#include <bits/stdc++.h>
using namespace std;
string s;
int x,y;
int main()
{
	cin>>s;
	for(int i=1;i<=s.size();i++)
	{
		if(s[i-1]=='-')x++;
		if(s[i-1]=='o')y++;
	}
	if(x<=0||y<=0)puts("YES");
	else if(x<y)puts("NO");
	else if(x%y==0||y%x==0)puts("YES");
	else puts("NO");
}

#pragma comment(linker, "/STACK:36777216")
#include <iostream>
#include <math.h>
#include <string>
#include <algorithm>
#include <vector>
#include <stack>
#include <map>
#include <set>
#include <queue>

typedef long long ll;

using namespace std;
inline ll MAX(ll a, ll b) { return (a > b) ? (a) : (b); }
inline ll MIN(ll a, ll b) { return (a < b) ? (a) : (b); }

#define rep(i,a,b) for(i=a; i<=b; i++)
#define brep(i,b,a) for(i=b; i>=a; i--)
#define sd second
#define ft first
#define mp make_pair

int main()
{
	int const sz = 4e5 + 10;
	ll i, j, q, k,x,a,n;
	string s;
	cin >> s;
	ll cnt = 0, cnt2 = 0;

	rep(i, 0, s.length() - 1)
	{
		if (s[i] == 'o') cnt++;
		else cnt2++;
	}
	if (cnt==0 || cnt2%cnt == 0) cout << "YES";
	else cout << "NO";

	return 0;
}

#include<bits/stdc++.h>
using namespace std;
int main()
{
    string s;
    cin>>s;
    int pearl=0,link=0;
    for(int i=0;i<s.length();i++)
    {
        if(s[i]=='o')
            pearl++;
        else
            link++;
    }
    if(pearl==0)
        cout<<"YES"<<endl;
   else if(link%pearl==0)
        cout<<"YES"<<endl;
    else
        cout<<"NO"<<endl;
}

#include<bits/stdc++.h>
using namespace std;
int main()
{
    char a;
    int o=0,k=0;
    while(cin>>a)
    {
        if(a=='o')o++;
        else if(a=='-')k++;
    }
    if(o==0)
    {
        cout<<"YES"<<endl;
        exit(0);
    }
    if(k%o==0)cout<<"YES"<<endl;
        else cout<<"NO"<<endl;
    return 0;
}

#include<stdio.h>
#include<iostream>
#include<math.h>
#include<string.h>
#define ll long long
using namespace std;
const int MM=1e6+5;
char s[MM];
int main()
{
    scanf("%s",s);
    int len=strlen(s);
    int sum1=0,sum2=0;
    int s1,s2;
    for(int i=0; i<len; i++)
    {
        if(s[i]=='o')
        {
            sum1++;
        }
        else  if(s[i]=='-')
        {
            sum2++;
        }
    }
    //cout<<sum1<<" "<<sum2<<" "<<endl;
    if(sum1==0||sum2==0)
        printf("YES\n");
    else if(sum2!=1&&sum1==1)
        printf("YES\n");
    else if(sum1!=1&&sum2!=1&&sum1<=sum2)
    {
        s1=min(sum1,sum2);
        s2=max(sum1,sum2);
        if(s2%s1==0)
            printf("YES\n");
        else
            printf("NO\n");
    }
    else if(sum2>sum1)
    {
        printf("NO\n");
    }
    else
    {
        printf("NO\n");
    }
    return 0;
}

#include<bits/stdc++.h>
using namespace std;
int main()
{
	string s; cin>>s;
	int count=0;
	int p=0;
	for(int i=0;i<s.size();i++){
		if(s[i]=='-')
			count++;
		else p++;
	}
	if(count==0 or p==0 or count==p)
		cout<<"YES";
	else if(p>count)
	{
		cout<<"NO";
	}
	else if(count>p)
	{
		if(count%p==0)
			cout<<"YES";
		else cout<<"NO";
	}
	return 0;
}

#include<cstdio>
#include<cmath>
#include<vector>
#include<string>
#include<algorithm>

using namespace std;

int main()
{
	int n;
	char input[101];
	string str;
	int i;
	int cnt = 0;
	int pearl, link;

	scanf("%s", input);

	str = input;
	n = str.size();

	for (i = 0; i < n; i++)
	{
		if (str[i] == 'o')
		{
			cnt++;
		}
	}

	pearl = cnt;
	link = n - cnt;

	if (pearl == 0 || !(link%pearl))
	{
		printf("YES\n");
	}

	else
	{
		printf("NO\n");
	}

	return 0;
}

#include <bits/stdc++.h>

using namespace std;

int main()
{

  string s;
  cin>>s;
  int count=0;
  int count2=0;
  for(int i = 0 ; i < s.size() ; i++){
    if(s[i]=='-'){
        count++;
    }
    else{
        count2++;
    }
  }
  if(count==0){
    cout<<"YES";
    return 0;
  }

  if(count2<=0){
    cout<<"YES";
    return 0;
  }

  if(count%count2==0){
    cout<<"YES";
  }
  else{
    cout<<"NO";
  }
}

#include <iostream>
#include <cstdio>
#include <algorithm>
#include <vector>
#include <map>
#include <string>
#include <queue>
#include <cstring>
#include <sstream>

using namespace std;

int main() {

    cin.tie(NULL);
    ios::sync_with_stdio(false);
    string inp;
    cin >> inp;
    int d = 0, o = 0;
    string a[] = {"YES", "NO"};
    for (int i = 0; i < inp.size(); ++i) {
        if (inp[i] == 'o') o++;
        if (inp[i] == '-') d++;
    }
    if (d == 0 || o == 0 || d % o == 0) cout << a[0] << '\n';
    else cout << a[1] << '\n';
}

#include<bits/stdc++.h>
using namespace std;
string c;
int main(){
	int a=0,b=0;
	cin>>c;
	for(int i=0;i<c.size();i++){
		if(c[i]=='-')a++;
		else b++;
	}
	if(b==0)cout<<"YES"<<endl;
	else if(a%b==0)cout<<"YES"<<endl;
	else cout<<"NO"<<endl;
	return 0;
}

/*
	Author: Luis Manuel Díaz Barón (LUISMO)
	Problem:
	Online Judge: COJ
	Idea:
*/
#include<bits/stdc++.h>
// Types
#define ll long long
#define ull unsigned long long
// IO
#define sf scanf
#define pf printf

using namespace std;

const int lim = 1e6 + 7;

string str;

void solve()
{
    cin >> str;
    int links = 0, pearls = 0;
    for(int i = 0; i < str.size(); i++)
    {
        if(str[i] == '-') links++;
        else pearls++;
    }

    if(pearls == 0) {cout << "YES"; return;}

    if(pearls > 0 && links % pearls == 0)
        cout << "YES";
    else cout << "NO";

}

int main()
{
	if(fopen("d:\\lmo.in","r") != NULL)
	{
		freopen("d:\\lmo.in","r",stdin);
	}
	else if(fopen("/media/luismo/Pablo's Destruction/lmo.in","r") != NULL)
	{
		freopen("/media/luismo/Pablo's Destruction/lmo.in", "r", stdin);
	}

	cin.sync_with_stdio(false);
	cin.tie(0);

	solve();
}

#include<stdio.h>
#include<string.h>
int l,n1,n2;
char s[105];
int main(){
    gets(s);
    l=strlen(s);
    for(int i=0;i<l;i++)
        if(s[i]=='o')n1++;
        else if(s[i]=='-')n2++;
    if(n1==0)puts("YES");
    else if(n2%n1==0)puts("YES");
    else puts("NO");
    return 0;
}

#include<bits/stdc++.h>

using namespace std;
const int maxn = 1005;

char ch[maxn];
int anso, ansl;

int main() {
	scanf("%s", ch);
	int len = strlen(ch);
	for (int i = 0; i < len; ++i) {
		ch[i] == 'o' ?anso++ :ansl++;
	}
	if(anso == 1 || anso == 0) printf("YES\n");
	else if(ansl == 0) printf("YES\n");
	else if(ansl % anso == 0) printf("YES\n");
	else printf("NO\n");
	return 0;
}

#include <iostream>
#include <string>

using namespace std;

int main() {
	string s;
	int perle = 0, lacci = 0;

	cin >> s;
	for (int i=0;i<s.length();i++)
		if (s[i] == 'o')
			perle ++;
		else
			lacci++;
	if ((perle == 0) || (lacci%perle == 0))
		cout << "YES";
	else
		cout << "NO";
	return 0;
}

#include <iostream>
#include <map>
using namespace std;
int main(){
    string s;
    cin >> s;
    map<char,int> dict;
    for (char i : s){
        dict[i]++;
    }
    if (dict['o']==0 || dict['-']==0) cout << "YES\n";
    else if (dict['-']%dict['o']==0) cout << "YES\n";
    else cout << "NO\n";
}

#include <algorithm>
#include <stack>
#include <istream>
#include <stdio.h>
#include <map>
#include <math.h>
#include <vector>
#include <iostream>
#include <queue>
#include <string.h>
#include <set>
#include <cstdio>
#define FR(i,n) for(int i=0;i<n;i++)
#define MAX 2005
using namespace std;
const int maxn = 1e4+ 1000;
typedef long long ll;

int sum1=0,sum2=0;
char str[maxn];
int main(){
    scanf("%s",str);
    int len=strlen(str);
    for(int i=0;i<len;i++){
        sum1+=(str[i]=='o');
    }
    if(sum1==0){puts("YES");return 0;}
    if(sum1!=len){
       sum2=len-sum1;
      // if(sum1>sum2)swap(sum1,sum2);
       if(sum2%sum1==0)puts("YES");
       else puts("NO");
    } else {
       puts("YES");
    }
    return 0;
}
/*
long long int s[maxn+4],p[maxn+4],k[maxn+4];
inline int getsum(int k){int sum=0;while(k){sum++;k/=10;}return sum;}
int main(){
    s[1]=1;
    int cnt=1;
    p[0]=0;k[0]=0;
    for(int i=1;i<= 52849;i++)s[i]=getsum(i);
    for(int i=1;i<= 52849;i++)p[i]=p[i-1]+s[i];
    for(int i=1;i<= 52849;i++)k[i]=p[i]+k[i-1];
    int t;
    scanf("%d",&t);
    int left,pos;
	while(t--)
	{
	    int num;
		scanf("%d", &num);

        left=lower_bound(k+1,k+1+maxn,num)-(k+1);

        pos=num-k[left];
        left=lower_bound(p+1,p+1+maxn,pos)-(p+1);

        pos=pos-p[left];
        left++;
        pos=s[left]-pos+1;
        int i=1;
        while(i<pos){left/=10;i++;}
        cout<<left%10<<endl;

	}

    return 0;
}I*/
/*#include <algorithm>
#include <stack>k,
#include <istream>
#include <stdio.h>
#include <map>
#include <math.h>
#include <vector>
#include <iostream>
#include <queue>
#include <string.h>
#include <set>
#include <cstdio>
#define FR(i,n) for(int i=0;i<n;i++)
#define MAX 2005
using namespace std;
const int maxn = 5e3 + 5;
typedef long long ll;

int n,m;
int arr[maxn][maxn];
char out[maxn][maxn];
int tmp[maxn][maxn];
int vis[maxn];
void work()
{
    for(int i=1;i<=n;i++)
        for(int j=1;j<=m;j++)
         tmp[i][j]=arr[i][j];
}
void solve(int i,int j)
{
    tmp[i][j]|=tmp[i][j];
    if(i+1<=n)tmp[i+1][j]|=tmp[i+1][j];
    if(j+1<=m)tmp[i][j+1]|=tmp[i][j+1];
    if(i-1>=1)tmp[i-1][j]|=tmp[i-1][j];
    if(j-1>=1)tmp[i][j-1]|=tmp[i][j-1];
}
int main(){
  //  int n,m;
    scanf("%d%d",&n,&m);
    for(int i=1;i<=n;i++){
        for(int j=1;j<=m;j++){
             int tem;
             scanf("%d",&tem);
             out[i][j]=tem+'0';
        }
    }
    int len=strlen(out[1]);
    for(int i=1;i<=(1<<len);i++){
         work();
         for(int j=1;j<=len;j++){
            if(i&(1<<j)){
               solve(i,j);
            }
         }
         for(int j=2;j<=n;j++){
            for(int k=1;k<=m;k++){

            }
         }
    }
    return 0;
}
*/

//1 1 1 1 1 2 1 2

/*#include<cstdio>
#include<cstdlib>
#include<algorithm>
#include<cstring>
#include<iostream>
#include<queue>
#define ll long long
#define N 405
using namespace std;
const int dx[5]={1,-1,0,0},dy[5]={0,0,1,-1};
int n,m,f[N][N],ex,ey,sx,sy,q,u1[N*3],v1[N*3];
char ch;
char a[N][N];
struct he{
    int u,v,t;
}b[N][N];
queue<he>Q;
void bfs(int sx,int sy){
    int ans=10000000;
    while(!Q.empty()) Q.pop();
    for(int i=0;i<n;i++)
        for(int j=0;j<m;j++) f[i][j]=10000000;
    f[sx][sy]=0;
    Q.push((he){sx,sy,0});
    while(!Q.empty()){
        he p=Q.front();Q.pop();
        if(p.u==ex&&p.v==ey) {
            ans=min(ans,p.t);
            continue;
        }
        if(b[p.u][p.v].u!=-1){
            int x1=b[p.u][p.v].u;
            int y1=b[p.u][p.v].v;
            if(a[x1][y1]!='#'&&f[x1][y1]>p.t+3){
                f[x1][y1]=p.t+3;
                Q.push((he){x1,y1,p.t+3});
            }
        }
        for(int i=0;i<4;i++){
            int x1=p.u+dx[i];
            int y1=p.v+dy[i];
            if(x1<n&&x1>=0&&y1>=0&&y1<m&&a[x1][y1]!='#'&&f[x1][y1]>p.t+1){
                f[x1][y1]=p.t+1;
                Q.push((he){x1,y1,p.t+1});
            }
        }
    }
    if(ans!= 10000000)
    printf("%d\n",ans);else printf("-1\n");
}
int main(){
    //freopen("1.in","r",stdin);
    for(int i=0;i<=300;i++)
        for(int j=0;j<=300;j++) b[i][j].u=b[i][j].v=-1;
    while(scanf("%d%d%d",&n,&m,&q)!=EOF){
        for(int i=0;i<n;i++)
            for(int j=0;j<m;j++){
                scanf("%c",&ch);
                while(ch!='.'&&ch!='S'&&ch!='T'&&ch!='#') ch=getchar();
                a[i][j]=ch;
                if(ch=='S') sx=i,sy=j;
                if(ch=='T') ex=i,ey=j;
            }
        for(int i=1;i<=q;i++){
            scanf("%d%d",&u1[i],&v1[i]);
            scanf("%d%d",&b[u1[i]][v1[i]].u,&b[u1[i]][v1[i]].v);
        }
        bfs(sx,sy);
        for(int i=1;i<=q;i++)
            b[u1[i]][v1[i]].u=-1,b[u1[i]][v1[i]].v=-1;
    }
}*/
/*
long long int n,arr[maxn];
int vis[maxn];
long long int sum[maxn];
void init()
{
    memset(vis,0,sizeof(vis));
    memset(sum,0,sizeof(sum));
    vis[1]=1;sum[1]=0;
    vis[2]=0;sum[2]=0;
    for(int i = 1;i<sqrt(maxn);i++) {
         if(!vis[i]) {
            for(int j = 2;j*i<maxn;j++) {
                vis[i]=1;
                sum[i*j]++;
            }
         }
    }//for(int i = 1;i<100;i++)printf("%d ",sum[i]);
}
int main() {
    int T;
    init();
    while(~scanf("%d",&T))
    {
        scanf("%d",&n);
        long long int ans = 0;
        for(int i = 0;i<n;i++)
        {
            long long int val;
            scanf("%lld",&val);
            ans+=val-sum[val]-1;
            //scanf("%d",&arr[i]);
        }
        cout<<ans<<endl;
    }
    return 0;
}

*/

/*
int arr[maxn][maxn];
int dp[maxn][maxn];
int N;
int dfs(int Curi,int Curj,int Sum)
{
    if(Curi>=N||Curj>=N)return 0;
    if(dp[Curi][Curj]!=-1)return dp[Curi][Curj];
    int tmp = Sum,temp=0;
    while(tmp) {
        if(tmp%10!=0)break;
        tmp/=10;
        temp++;
    }
    return dp[Curi][Curj]=temp+min(dfs(Curi+1,Curj,Sum*arr[Curi+1][Curj]),dfs(Curi,Curj+1,Sum*arr[Curi][Curj+1]));
}
void Print(int sum,int Nowi,int Nowj)
{
    int u = 0;
    int Tmp=sum;
    while(Tmp)
    {
        if(Tmp%10)break;
        Tmp/=10;u++;
    }
    Tmp=dp[Nowi][Nowj];
    if(dp[Nowi+1][Nowj])
}
int main() {
   // int n;
    scanf("%d",&N);
    memset(dp,-1,sizeof(dp));
    for(int i = 0;i<N;i++)
       for(int j = 0;j<N;j++) {
        scanf("%d",&arr[i][j]);
       }
    dfs(0,0,arr[0][0]);

    cout<<dp[0][0]<<endl;
    Print(arr[0][0],0,0);
    return 0;
}
*/

/*
long long int n,arr[maxn];
int vis[maxn];
long long int sum[maxn];
void init()
{
    memset(vis,0,sizeof(vis));
    memset(sum,0,sizeof(sum));
    vis[1]=1;sum[1]=0;
    vis[2]=0;sum[2]=0;
    for(int i = 1;i<sqrt(maxn);i++) {
         if(!vis[i]) {
            for(int j = 2;j*i<maxn;j++) {
                vis[i]=1;
                sum[i*j]++;
            }
         }
    }//for(int i = 1;i<100;i++)printf("%d ",sum[i]);
}
int main() {
    int T;
    init();
    while(~scanf("%d",&T))
    {
        scanf("%d",&n);
        long long int ans = 0;
        for(int i = 0;i<n;i++)
        {
            long long int val;
            scanf("%lld",&val);
            ans+=val-sum[val]-1;
            //scanf("%d",&arr[i]);
        }
        cout<<ans<<endl;
    }
    return 0;
}

*/

/*
int arr[maxn][maxn];
int dp[maxn][maxn];
int N;
int dfs(int Curi,int Curj,int Sum)
{
    if(Curi>=N||Curj>=N)return 0;
    if(dp[Curi][Curj]!=-1)return dp[Curi][Curj];
    int tmp = Sum,temp=0;
    while(tmp) {
        if(tmp%10!=0)break;
        tmp/=10;
        temp++;
    }
    return dp[Curi][Curj]=temp+min(dfs(Curi+1,Curj,Sum*arr[Curi+1][Curj]),dfs(Curi,Curj+1,Sum*arr[Curi][Curj+1]));
}
void Print(int sum,int Nowi,int Nowj)
{
    int u = 0;
    int Tmp=sum;
    while(Tmp)
    {
        if(Tmp%10)break;
        Tmp/=10;u++;
    }
    Tmp=dp[Nowi][Nowj];
    if(dp[Nowi+1][Nowj])
}
int main() {
   // int n;
    scanf("%d",&N);
    memset(dp,-1,sizeof(dp));
    for(int i = 0;i<N;i++)
       for(int j = 0;j<N;j++) {
        scanf("%d",&arr[i][j]);
       }
    dfs(0,0,arr[0][0]);

    cout<<dp[0][0]<<endl;
    Print(arr[0][0],0,0);
    return 0;
}
*/

#define _CRT_SECURE_NO_WARNINGS
#include<iostream>
#include<iterator>
#include <cstdio>
#include <vector>
#include <string>
#include <numeric>
#include <cmath>
#include <algorithm>
#include <set>
#include <map>
#include <deque>
#include <queue>
#include <stack>
#include<utility>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<int, int> pii;
typedef pair<double, double> pdd;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<double> vd;
typedef vector<ld> vld;
typedef vector<pii> vpii;
typedef vector<pdd> vpdd;
typedef vector<string> vs;
typedef set<int> si;
typedef multiset<int> Si;
typedef map<int, int> mi;
typedef multimap<int, int> Mi;
void read(char& a) { do scanf("%c", &a); while (isspace(a)); }
void write(const char& a) { printf("%c", a); }
char BUF[1234560];
void read(string& a) { scanf("%s", BUF); a = string(BUF); }
void write(const string& a) { printf("%s", a.c_str()); }
void read(int& a) { scanf("%d", &a); }
void write(const int& a) { printf("%d", a); }
void read(ll& a) { scanf("%I64d", &a); }
void write(const ll& a) { printf("%I64d", a); }
void read(double& a) { scanf("%lf", &a); }
void write(const double& a) { printf("%lf", a); }
void read(ld& a) { scanf("%Lf", &a); }
void write(const ld& a) { printf("%Lf", a); }
void read(pair<int, int>& a) { scanf("%d%d", &a.first, &a.second); }
void write(const pair<int, int>& a) { printf("%d %d", a.first, a.second); }
template<template<typename T, typename A = allocator<T> > class C, class T>
void read(C<T>& a) { for (auto i = a.begin(); i != a.end(); ++i) read(*i); }
template<template<typename T, typename A = allocator<T> > class C, class T>
void write(const C<T>& a) { int sz = a.size(); if (sz != 0) write(a[0]); for (int i = 1; i < sz; ++i) { write(' '); write(a[i]); } }
template<typename T1, typename T2>
void read(T1& t1, T2& t2) { read(t1); read(t2); }
template<typename T1, typename T2>
void write(const T1& t1, const T2& t2) { write(t1); write(' '); write(t2); }
template<typename T1, typename T2, typename T3>
void read(T1& t1, T2& t2, T3& t3) { read(t1); read(t2); read(t3); }
template<typename T1, typename T2, typename T3, typename T4>
void read(T1& t1, T2& t2, T3& t3, T4& t4) { read(t1); read(t2); read(t3); read(t4); }
template<typename T1, typename T2, typename T3>
void write(const T1& t1, const T2& t2, const T3& t3) { write(t1); write(' '); write(t2); write(' '); write(t3); }
template<template<typename T, typename A = allocator<T> > class C, class T>
void sort(C<T>& a) { sort(a.begin(), a.end()); }
template<template<typename T, typename A = allocator<T> > class C, class T>
void rsort(C<T>& a) { sort(a.rbegin(), a.rend()); }
template<typename T>
int sz(const T& a) { return int(a.size()); }
#define MX 1000000000
#define all(a) (a).begin(),(a).end()
#define rall(a) (a).rbegin(),(a).rend()
#define T(n) for(int _VARIABLE{(n) + 1}; --_VARIABLE;)
#define F(b,e,i) for(auto i = (b) < decltype(b)(e) ? (b) : decltype(b)(e); i != ((b) < decltype(b)(e) ? decltype(b)(e) : (b)); ++i)
#define G(f,l,i) for(auto i = ((f) < decltype(f)(l) ? (f) : decltype(f)(l)) - 1; i++ < decltype(i)((f) < decltype(f)(l) ? decltype(f)(l) : (f)) ;)
#define M(f,l,i,j) for(auto i = (f) , j = decltype(f)(l) ; i < j; ++i, --j)
#define r(...) read(__VA_ARGS__)
#define R(type, ...) type __VA_ARGS__; r(__VA_ARGS__)
#define w(...) write(__VA_ARGS__)
#define W(...) write(__VA_ARGS__), write('\n')
#define bgn begin()
#define nd end()
#define pb push_back
#define fnt front()
#define bck back()

int main()
{
#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif
	R(string, s);
	int p{ count(all(s),'o') };
	int l{ s.size() - p };
	W(p != 0 && l % p ? "NO" : "YES");
}
//
// ArtemParkhomets
//

#include<bits/stdc++.h>
using namespace std;
int main()
{
	int a=0,b=0;
	string s;
	cin>>s;
	int len=s.length();
	for(int i=0;i<len;i++)
	{
		if(s[i]=='o')
		{
			a++;
		}
		else
		{
			b++;
		}
	}
	if(!a||b%a==0)
	{
		cout<<"YES\n";
	}
	else
	{
		cout<<"NO\n";
	}
	return 0;
}

#include <bits/stdc++.h>
#define int long long
#define pb push_back
#define dd double
#define pt(x) cout<<(x)<<"\n"
#define debug(x) cout<<"X="<<x<<"\n"
#define apsc ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
#define s(v) sort(v.begin(),v.end())
#define rsort(v) sort(v.begin(),v.end(),greater<int>())
#define all(arr) sort(arr,arr+n)
#define loop0(n) for(int i=0;i<n;i++)
#define loop1(n) for(int i=1;i<=n;i++)
#define rev(a,n) for(int i=n-1;i>=a;i--)
const int M = 1e7 + 7;
const double pi= 3.14159265358979323846;
inline void tc() {
#ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif
}
//AND THE SHOW BEGINS :)//
using namespace std;
signed main()
{
	string s;cin>>s;
	int n=s.size();
	int link=0,pearl=0;
	loop0(n)
	{
	    if(s[i]=='-') link++;
	    else pearl++;
	}
	if(pearl==0 || link==0) pt("YES");
	else
    {
        //
        if(pearl==link) pt("YES");
        else if(pearl<link && link%pearl==0 ) pt("YES");
        //else if(pearl>link && pearl%link==0 && link!=1) pt("YES");
        else pt("NO");
    }
	return 0;
}

#include <iostream>
#include <string>

using namespace std;
int main(){
    int n = 0, b = 0;
    string s;
    cin >> s;
    for (int i = 0; i < s.length(); i++){
        if (s[i] == '-'){
            n++;
        }
        else{
            b++;
        }
    }
    bool res = false;
    if (n == 0)
        res = true;
    else if (b == 0 || b == 1)
        res = true;
    else if (b == 2){
        if (n % 2 == 0)
            res = true;
    }
    else if (n % b == 0){
        res = true;
    }
    if (res)
        cout << "YES";
    else
        cout << "NO";
    return 0;
}

#include<cstdio>
#include<cstring>
using namespace std;
int main(void)
{
	char c;
	int a=0,b=0;
	while(~scanf("%c",&c))
		if(c=='o')
			++a;
		else if(c=='-')
			++b;
	if(a==0||b==0)
	{
		puts("YES");
		return 0;
	}
	else if(a>b)
	{
		puts("NO");
		return 0;
	}
	else
		if(b%a==0)
			puts("YES");
		else
			puts("NO");
	return 0;
}

#include <bits/stdc++.h>
using namespace std;
string s;
int cnt1, cnt2;
int main() {
    cin >> s;
    for (int i = 0; i < s.length(); ++i) {
        if (s[i] == 'o') {
            ++cnt1;
        } else {
            ++cnt2;
        }
    }
    if (cnt2 == 0 || cnt1 == 0) {
        cout << "YES" << endl;
        return 0;
    }
    if (cnt2 % cnt1 == 0) {
        cout << "YES" << endl;
    } else {
        cout << "NO" << endl;
    }
    return 0;
}

#include <iostream>
#include <string>
using namespace std;

int main()
{
	string str;
	int circles = 0, nib = 0;
	cin >> str;

	for (int i = 0; i < str.length(); i++)
	{
	    if (str[i] == 'o') circles++;
	    else if (str[i] == '-') nib++;
	}

	if (circles == 0 || nib % circles == 0) cout << "YES";
	else cout << "NO";

	return 0;
}

#include <iostream>
#include <string>

using namespace std;

string s; int d,t;

int main()
{
    cin >> s;
    for (int i = 0; i < (int)s.length(); ++i)
    {
        if (s[i] == '-') ++d;
        else ++t;
    }
    if (t == 0 || d == 0) cout << "YES";
    else
    if (d >= t && d % t == 0) cout << "YES";
    else cout << "NO";
    return 0;
}

// In The Name Of God

/*  ki oomade?!  */

#include <bits/stdc++.h>

using namespace std;

string s;
int p, l;

int main()
{
    cin >> s;
    for(int i = 0; i < s.size(); i ++){
        if(s[i] == 'o')
            p ++;
        else
            l ++;
    }

    if(p == 0)
        return cout << "YES" << endl, 0;
    if(l % p == 0)
        return cout << "YES" << endl, 0;
    return cout << "NO" << endl, 0;
}

#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define lli long long int
#define mp make_pair
#define MOAE                 \
	ios::sync_with_stdio(0); \
	cin.tie(0);              \
	cout.tie(0);
ll a[26], b[26];
template <typename Map>
bool map_compare(Map const &m, Map const &mm)
{
	if (m.size() == mm.size() && equal(m.begin(), m.end(), mm.begin()))
		return true;
	return false;
}
int main()
{
	MOAE;
	string s;
	cin >> s;
	ll o = 0, _ = 0;
	for (auto it : s)
	{
		if (it == 'o')
		{
			o++;
		}
		else
		{
			_++;
		}
	}
	if (!_ || !o)
		cout << "YES" << endl;
	else if (_ % o == 0)
		cout << "YES" << endl;
	else
		cout << "NO" << endl;
}

#include<iostream>

using namespace std;

int main()
{
	string s;
	int demo=0, dem=0;
	cin >> s;
	for(int i=0; i<s.size(); i++)
	{
		if(s[i]=='o')
			demo++;
		else dem++;
	}
	if(demo!=0)
	{
		if(dem%demo==0 && dem/demo >=2)
		{
			cout << "YES";
			return 0;
		}
	}
	if(demo==0)
	{
		cout << "YES";
		return 0;
	}
	if(demo==dem)
	{
		cout <<"YES";
		return 0;
	}
	if(dem==0)
	{
		cout << "YES";
		return 0;
	 }
	cout << "NO";
}

#include <iostream>
#include <string>
using namespace std;

int main()
{
	//freopen("in.txt","r",stdin);
	string s;
	while(cin>>s)
	{
		int cnt=0;
		for(int i = 0 ; i < s.size() ; i++)
		{
			if(s[i]=='-')
				cnt++;
		}
		int k = s.size()-cnt;
		if(k==0||cnt%k==0)
		{
			printf("YES\n");
		}
		else
			printf("NO\n");
	}
	return 0;
}

#include<bits/stdc++.h>
using namespace std;
int o,k;
char a;
int main(){
    while(cin>>a){
        if(a=='o') o++;
        else if(a=='-') k++;
    }
    if(o==0){
        cout<<"YES"<<endl;
        return 0;
    }
    if(k%o==0)
        cout<<"YES"<<endl;
    else
        cout<<"NO"<<endl;
    return 0;
}

#include <bits/stdc++.h>

using namespace std;

char s[200];

int main() {

	scanf("%s",s);

	int n=strlen(s),l=0,p=0;

	for(int i=0;i<n;i++){

		if(s[i]=='-') l++;

		else p++;

	}

	if(p==0) printf("YES");

	else if(l%p==0) printf("YES");

	else printf("NO");

	return 0;

}

#include<iostream>
#include<string.h>
#include<math.h>
#include<cstdio>
#include<cstring>
#include<set>
#include<vector>
#include<cmath>
#include<algorithm>
#include<map>
#include<queue>
#define inf 2000000000
#define INF 1<<29
#define S(a) scanf("%d",&a)

#define OT(a) printf("%d\n",a)

#define me(a,b) memset(a,b,sizeof(a))
typedef long long ll;
using namespace std;
const int maxn=1e5+1;
const int mo=1e9+7;
inline int read()
{
    int x=0,f=1;char ch=getchar();
    while(ch<'0'||ch>'9'){if(ch=='-')f=-1;ch=getchar();}
    while(ch>='0'&&ch<='9'){x=x*10+ch-'0';ch=getchar();}
    return x*f;
}
ll quickpow(int a,int b){
    ll ans=1,pow=a;
    while(b){
        if(b&1)ans*=pow;
        pow*=pow;
        b>>=1;
    }
    return ans;
}
char s[110];
int main(){
	scanf("%s",s);
	int l=strlen(s);
	int cnt=0;
	for(int i=0;i<l;i++){
		if(s[i]=='o')cnt++;
	}
	if(cnt==0){
		puts("YES");
		return 0;
	}
	else if((l-cnt)%cnt==0)puts("YES");
	else puts("NO");
    return 0;
}

#include<iostream>
#include<stdlib.h>
#include<string>
using namespace std;
int main(){
	int p=0, d=0;
	string k;
	getline(cin, k);
	for (int i = 0;i<k.length();i++){
		if (k[i] == 'o')
			p++;
		else
			d++;

	}

	if (d == 0 || p==0){
		cout << "YES";

	}
	else if (d%p == 0){
		cout << "yes";
	}
	else
		cout << "NO";

}

#include <bits/stdc++.h>
using namespace std;
char ch;
long long x=0,y=0;
int main()
{
	while(cin>>ch)
	{
	    if(ch=='-')
	        x++;
	    else
	        y++;
	}
	if(x%y==0||x==0||y==0)
		puts("YES");
	else
		puts("NO");
	return 0;
}

#include<bits/stdc++.h>
using namespace std;
int main()
{
    char a;
    int o=0,k=0;
    while(cin>>a)
    {
        if(a=='o')o++;
        else if(a=='-')k++;
    }
    if(o==0)
    {
        cout<<"YES"<<endl;
        exit(0);
    }
    if(k%o==0)cout<<"YES"<<endl;
    else cout<<"NO"<<endl;
    return 0;
}

#include<bits/stdc++.h>
using namespace std;
#define ll long long int
int main()
{
	string s;
	cin>>s;
	ll len=s.length();

	ll c=0,d=0;
	for(ll i=0;i<len;i++){
		if(s[i]=='-') d++;
		else c++;
	}

	if(d==0||c==0||c==d){
		cout<<"YES"<<endl;
	}
	else {
		if(d>c&&d%c==0){
			cout<<"YES"<<endl;
		}
		else{
			cout<<"NO"<<endl;
		}
	}
}

#include<bits/stdc++.h>
using namespace std;
int a,b,d;
char c[101];
int main()
{
	cin>>c;
	for(;a<strlen(c);a++)
	{
		if(c[a]==45)
		{
			b++;
		}
		else
		{
			d++;
		}
	}
	cout<<((d&&b%d)?"NO":"YES");
	return 0;
}

#include<stdio.h>

int main()
{
	char s[105];
	char temp;
	int pearls=0,links=0;

	do{
		scanf("%c",&temp);
		if(temp=='o')	pearls++;
		else if(temp=='-')	links++;
	}while(temp!='\n');

	if(pearls==0 || pearls==1 || links==0)	printf("YES\n");
	else if(pearls>links)	printf("NO\n");
	else if(links%pearls==0)	printf("YES\n");
	else	printf("NO\n");

	return 0;
}

#include<iostream>
#include<string>
using std::string;
string s;
int a,b;
int main()//不解释
{
	std::cin>>s;//输入
	for(int i=0;i<s.length();i++)
	{
		if(s[i]=='-')
			a++;
		else
			b++;
	}//求出共有多少个珍珠，多少个线
	if(b==0)
		std::cout<<"YES";//特判没有珍珠的情况
	else if(a%b==0)
		std::cout<<"YES";
	else
		std::cout<<"NO";
        /*通过打表找规律可得知，
        如果线的数量是珍珠的整数倍，则输
        出“YES”。*/
	return 0;
}

#include<bits/stdc++.h>
using namespace std;
int main(){

	char x[10000];
	cin>>x;
	int i,j,k,l,m=0,n=0;
	l=strlen(x);
	for(i=0;i<l;i++){

		if(x[i]=='-')m++;
		else n++;
	}
	if(n==m || n==1){printf("YES\n");return 0;}
	if(n==0) printf("YES\n");
	else if(l==n)printf("YES\n");
	else if(m%n==0)printf("YES\n");
	else if(m<n)printf("NO\n");
	else printf("NO\n");
	return 0;
}

#include<iostream>
#include<string>
#include<algorithm>
using namespace std;

int main()
{
	string s;
	cin>>s;

	cout<< (count(s.begin(),s.end(),'-')%(count(s.begin(),s.end(),'o')==0 ? 1 : count(s.begin(),s.end(),'o'))==0 ? "YES" : "NO" );
}

// CodeNumber : 231

#include<stdio.h>
#include<cstring>
using namespace std;
int read() {
	int x=0,f=1;
	char ch=getchar();
	while(ch<'0' || ch>'9') {
		if(ch=='-')	f=-1;
		ch=getchar();
	}
	while(ch>='0' && ch<='9') {
		x=10*x+ch-'0';
		ch=getchar();
	}
	return x*f;
}
const int Size=10001;
char a[Size];
int main() {
	gets(a);
	int len=strlen(a),cnt1=0,cnt2=0;
	for(int i=0; i<len; i++) {
		if(a[i]=='o') {
			cnt1++;
		} else {
			cnt2++;
		}
	}
	if(!cnt1 || !(cnt2%cnt1)) {
		puts("YES");
	} else {
		puts("NO");
	}
	return 0;
}

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

int main()
{
   string s;
   cin>>s;
   int c=0,d=0;
   for(int i=0;i<s.length();i++)
   {
       if(s[i]=='-')
       c++;
       else
       d++;
   }
   if(d>=1 &&(c%d==0 ||c==0))
   cout<<"YES\n";
   else if(c>=1 && d==0)
   cout<<"YES\n";
   else
   cout<<"NO\n";
}

#include<bits/stdc++.h>
using namespace std;
int main()
{
    char s[110];
    scanf("%s",s);
    int len = strlen(s);
    int cnt1,cnt2;
    cnt1 = cnt2 = 0;
    for(int i = 0; i < len; i++)
    {
        if(s[i] == '-')
            cnt1++;
        if(s[i] == 'o')
            cnt2++;
    }
    if(cnt2 == 0 || cnt1 == 0 ||( cnt1 >= cnt2 && cnt1 % cnt2 == 0))
        printf("YES\n");
    else
        printf("NO\n");
    return 0;
}

#include<iostream>
using namespace std;

int main(){
    string s;
    int len,x=0,y=0;
    cin>>s;
    len = s.length();
    for(int i=0; i<len; i++){
        if(s[i]=='o')x++;
        else y++;
    }
    if(min(x,y)==0)cout<<"YES"<<endl;
    else if(x>y)cout<<"NO"<<endl;
    else if(y%x)cout<<"NO"<<endl;
    else cout<<"YES"<<endl;
return 0;
}

#include<bits/stdc++.h>
using namespace std;
int main()
{
    char a;
    int o=0,k=0;
    while(cin>>a)
    {
        if(a=='o')o++;
        else if(a=='-')k++;
    }
    if(o==0)
    {
        cout<<"YES"<<endl;
        exit(0);
    }
    if(k%o==0)cout<<"YES"<<endl;
        else cout<<"NO"<<endl;
    return 0;
}

//

#include<iostream>
#include<map>
#include<string>

using namespace std;

int main() {
	string s;
	cin >> s;
	int A[2] = { 0 };//0 for pearl ,1 for link
	for (int i = 0; i < s.length(); i++) {
		A[1] += (s[i] == '-');
		A[0] += (s[i] == 'o');
	}
	if (A[0] == 0) {
		cout << "YES" << endl;
		return 0;
	}
	if (A[1]%A[0]== 0) cout << "YES" << endl;
	else cout << "NO" << endl;
	return 0;
}

# include  <iostream>
# include <string>
# include <set>
# include <map>
# include<algorithm>
# include <cmath>
# include <vector>
#include <utility>
#include <cmath>
#include <iomanip>
#include <queue>
#include <stack>
#include <stdio.h>
using namespace std;
int main()
{

	string s;
	cin >> s;
	int l = s.size(),c=0,x=0;

	for (int i = 0; i < l;i++)
	if (s[i] == '-')c++;
	else x++;
	if (x==0||c % x == 0)cout << "YES";
	else
		cout << "NO";
	return 0;
}

#pragma GCC optimize("O3")
#include <bits/stdc++.h>
#include <fstream>
#include <string>
#include <algorithm>
#include <list>
#include <vector>
#include <set>
#include <stdio.h>
#include <map>
#include <queue>
#include <iostream>
#include <math.h>

#define pb push_back
#define For(i,n) for(int i = (i);i < (n);i++)
#define Fol(i,a,b) for(int i = (a);i >= (b);i--)
#define si(a) scanf("%d",&a)
#define sl(a) scanf("%I64d",&a)
#define sd(a) scanf("%lf",&a)
#define ss(a) scanf("%s",a)
#define mp make_pair
#define ll long long
#define vsort(n) sort(n.begin(), n.end());
#define sort(a) sort(a, a+n);
#define reverse(v) reverse(v.begin(), v.end());
#define itn int
#define FILE "lepus"
#define boost  ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
using namespace std;

const long long Inf = 1e9 + 5;
const long long MaxN = 1e5+5;
const long long Min = -MaxN;

int Debug() {
    cout << "BUG" << " ";
}

set<int> s;

int main () {
	boost;
    string s; cin >> s;
    int cnt1 = 0; int cnt2 = 0;
    for(itn i = 0; i < s.size();i++) {
        if(s[i] == '-') {
            cnt1++;
        }
        if(s[i] == 'o') {
            cnt2++;
        }
    }
    if(cnt1) {
        cout << "YES";
    }
    if(cnt2) {
        cout << "NO";
    }
    if(cnt1%cnt2) {
        cout << "YES";
    }
    else {
        cout << "NO";
    }

    return 0;
}

#include<bits/stdc++.h>
using namespace std;
int main()
{
    string s;
    int cnt=0,dif=0,x=0,y=0,cn=0,j=0,c=0,div,sum=0,i,pos,len;
    cin>>s;
    len=s.size();
    if(s[0]=='o'&&s[len-1]=='o')
    {
        cout<<"NO"<<endl;
        return 0;
    }
    for(i=0;i<s.size();i++)
    {
        if(s[i]=='-')
            cnt++;
        if(s[i]=='o')
            cn++;
            if(x==0&&s[i]=='o')
            {

               j++;
               pos=j;

            }
    }
    if(cnt==s.size()||cn==s.size())
    {
        cout<<"YES"<<endl;
        return 0;
    }
    div=cn/2;
    while(s[pos]!='o')
    {
        c++;
        pos++;
    }

    sum=div*c;
    dif=cnt-sum;
    if(dif>=sum){
        cout<<"YES"<<endl;
        return 0;
    }
    cout<<"NO"<<endl;
    return 0;
}

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

main(){
     ios_base::sync_with_stdio(false);
     cin.tie(NULL); cout.tie(NULL);
     string s; cin >> s;
     int links = 0, pearls = 0;
     for(auto x : s){
          if(x == '-') links++;
          else pearls++;
     }
     if(pearls && links % pearls == 0) cout << "YES";
     else cout << "NO";
}

#include<bits/stdc++.h>
using namespace std;
int main()
{
    long long int n,i,k,j,l,t,r,e;
    char s[100000];
    gets(s);
    int cnt=0,mnt=0;
    l=strlen(s);
    for(i=0; i<l; i++)
    {
        if(s[i]=='-')cnt++;
        else
            mnt++;
    }
    if(mnt==0 || cnt==0)
    {
        printf("YES\n");
        return 0;
    }

        if(cnt%2==0)

            printf("YES\n");

    else
        printf("NO\n");
    return 0;
}

//#include<bits/stdc++.h>
//using namespace std;
//
//
//int main()
//{
//	string s;
//	cin >> s;
//	int len = s.size();
//	int n=0,j=0;;
//	for(int i=0;i<len;i++)
//	{
//		if(s[i]=='-') n++;
//		else if(s[i]=='o') j++;
//	}
//	if(j==1) cout << "YES" << endl;
//	else if(j>0 && n==0) cout << "YES" << endl;
//	else if(j*2==n) cout << "YES" << endl;
//	else if(j+1==n ) cout << "YES" << endl;
//	else cout << "NO" << endl;
//}
#include<bits/stdc++.h>
using namespace std;

int main()
{
	string s;
	while(cin >> s)
	{
		int len = s.size();
	map <char,int> m;
	for(int i=0;i<len;i++)
	{
		m[s[i]]++;
	}
	//int cont = m['o'];
	int x = m['-'];
	int y = m['o'];
	if(x*2>=y) cout << "YES" << endl;
	else if((m['-']!=m['o']+1)&&m['-']%2!=0 && m['o']>0) cout << "NO" << endl;
	else cout << "YES" << endl;
	}
}

    #include <bits/stdc++.h>

    using namespace std;

    int main()
    {
        string s;
        cin>>s;
        int coun=0,coun1=0;
        for(int i=0;i<s.size();i++)
            if(s[i]=='-')
                coun++;
            else
                coun1++;
        if(coun==0||coun1==0)
            cout<<"YES"<<endl;
            else if(coun1>coun&&(coun1%coun!=0||(coun==1&&coun1>2)))
                cout<<"NO"<<endl;
        else if(coun1<coun&&coun%coun1!=0)
                cout<<"NO"<<endl;
        else
            cout<<"YES"<<endl;
        return 0;
    }

#include<bits/stdc++.h>
using namespace std;
unsigned long long x,y;
char a;
int main()
{
    while(cin>>a)
    {
        if(a=='O')x++;
        else if(a=='-')y++;
    }
    if(x==0)
    {
        cout<<"YES"<<endl;
        return 0;
    }
    else
    {
        if(y%x==0)cout<<"YES"<<endl;
        else cout<<"NO"<<endl;
    }
    return 0;
}

#include <iostream>
#include <string>
#include <stdio.h>
#include <queue>
#include <stack>
#include <algorithm>
#include<vector>
#include<math.h>

using namespace std;

int main()
{
	string s;
	cin >> s;
	int c1 = 0, c2 = 0;
	for (int i = 0;i < s.length();i++)
	{
		if (s[i] == 'o')
			c1++;
		else c2++;
	}

	if (c1 == 0)
		cout << "NO" << endl;

	else if (c2%c1 == 0)
		cout << "YES" << endl;
	else cout << "NO" << endl;

	//system("pause");
	return 0;
}

#include <iostream>
#include <math.h>
using namespace std;

int main()
{
    string s;
    double m=0,n=0;
    cin>>s;
    for(int i=0;i<s.length();i++)
    {
        if(s[i]=='o')
            m++;
        else
            n++;
    }
    double k=n/m;
    int x=n/m;
    if(k>x)
        cout<<"NO"<<endl;
    else if(m==n)
        cout<<"YES"<<endl;
    else if(m==0)
        cout<<"NO"<<endl;
    else if(n==0)
        cout<<"YES"<<endl;
    else if(x%2==0)
        cout<<"YES"<<endl;
    else
        cout<<"NO"<<endl;
    return 0;
}

# include <bits/stdc++.h>
using namespace std;
int cnt, n;
string s;
int main (){
    cin >> s;
    sort (s.begin(), s.end());
    for (int i = 0; i < n; i ++){
        if (s[i] == 'o') cnt ++;
    }
    if (cnt == 0) cout << "YES";
    else if (s.size() % cnt == 0) cout << "YES";
    else cout << "NO";
}

#include <bits/stdc++.h>
using namespace std;
#define int long long
void fun()
{
	#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
	#endif
}
const int mod = 1e9 + 7;
const int N = 1e5 + 7;
signed main()
{
	fun();
	ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
	int tests = 1; //cin>>tests;
	while(tests--)
	{
		string s; cin>>s;
		int pearls = 0;
		int n = s.size();
		for(char ch: s) if(ch == 'o') pearls++;
		if((n - pearls) % 2) cout<<"NO";
		else cout<<"YES";
	}
	return 0;
}

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

int main(){
    char a[101];
    cin>>a;
    int l = strlen(a);
    int des = 0, perl = 0;
    for(int i = 0; i < l; i++){
        if(a[i]=='-'){
            des++;
        }
        else
            perl++;
    }

    if(des%2==0)
    {
        cout<<"YES\n";
        return 0;
    }
    else{
        cout<<"NO\n";
        return 0;
    }
}

#include <iostream>
#include <string>

using namespace std;

int main(){
    int pearls, links;
    string s;
    cin >> s;
    for(int i=0; i<s.size(); ++i){
        if(s[i] == 'o'){pearls++;}
        else{ links++;}
    }
    if(pearls == 0 || links % pearls == 0){
        cout << "YES" << endl;
    }
    else{
        cout << s << " " << pearls << " " << links << endl;
        cout << "NO" << endl;
    }
    return 0;
}

#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define cn continue
#define br break
int main(){
	ll cntm=0,cnto=0;
	string s;
	cin>>s;
	for(int i=0;i<s.size();i++){
		if(s[i]=='-')cntm++;
		else cnto++;
	}
	if(cntm==0)cout<<"YES";
	else if(cntm<cnto){
		cout<<"NO";
		return 0;
	}
	else if(cnto%2==0){
		if(cntm%2==0){
			cout<<"YES";
		}
		else cout<<"NO";
	}
	else{
		cout<<"YES";
	}
}
/*
*/

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

int main()
{
	int count1=0,count2=0;
	string s;
	cin>>s;
	for(int i=0;i<s.length();i++)
	{
		if(s[i]=='-') count1++;
		else count2++;
	}
	if(count2==0 || count2==1)
	{
		cout<<"NO"<<endl;
		return 0;
	}
	if(count1==0)
	{
		cout<<"YES"<<endl;
		return 0;
	}
	if(count1==count2)
	{
		cout<<"YES"<<endl;
		return 0;
	}
	if(count1%2==0 && count2<=count1/2) cout<<"YES"<<endl;
	else cout<<"NO"<<endl;
}

#include <bits/stdc++.h>
using namespace std;
#define FASTIO ios::sync_with_stdio(0); cin.tie(NULL); cout.tie(NULL);

int main() {
#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif
	FASTIO

	string nec;
	cin >> nec;
	int l = 0, p = 0;
	for (char c: nec)
		if (c == 'o') p++;
		else l++;
	if (l&1 || p == 0) cout << "NO";
	else cout << "YES";
}

#include <iostream>
#include <bits/stdc++.h>
#include <stdio.h>

#define loop(i,n) for(int i = 0;i < int(n);i++)
#define rloop(i,n) for(int i = int(n)-1;i >= 0;i--)
#define range(i,a,b) for(int i = int(a);i <= int(b);i++)
#define sfi1(v) scanf("%d",&v)
#define sfi2(v1,v2) scanf("%d %d",&v1,&v2)
#define sfi3(v1,v2,v3) scanf("%d %d %d",&v1,&v2,&v3)
#define sfll1(v) scanf("%I64d",&v);
#define sfll2(v1,v2) scanf("%I64d %I64d",&v1,&v2)
#define sfll3(v1,v2,v3) scanf("%I64d %I64d %I64d",&v1,&v2,&v3)
#define pb push_back
//#define SZ(c) int(c.size())
//#define ALL(c) c.begin(), c.end()
//#define RALL(c) c.rbegin(), c.rend()
//#define PI acos(-1)
//#define mp make_pair
//#define fr first
//#define sc second

typedef long long ll;
//typedef vector<int> vi;
//typedef vector<pair<int,int> > vii;
//typedef pair<int, int> pii;

using namespace std;

string s;
int m=0,n=0;

int main()
{
   cin>>s;
   loop(i,s.size())
   {
     if(s[i]=='-') m++;
     else n++;
   }
   if(m==0 || n==0)cout<<"YES";
   if(!(m%n)) cout<< "YES";
   else cout<<"NO";
	return 0;
}

#include <iostream>

using namespace std;

int main()
{
    string s;
    int m=0,n=0;
    cin>>s;
    for(int i=0;i<s.length();i++)
    {
        if(s[i]=='o')
            m++;
        else
            n++;
    }
    if(n==0)
        cout<<"YES"<<endl;
    else if((n/m)%2==0)
        cout<<"YES"<<endl;
    else
        cout<<"NO"<<endl;
    return 0;
}

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

#define ll long long

int main()
{
    ll i,j,k;
    string s;
    while(cin>>s)
    {
        ll d=0,c=0;
        for(i=0;i<s.length();i++)
        {
            if(s[i]=='-') d++;
            else c++;
        }
        if(d==0 || c==0) cout<<"YES"<<endl;
        else if(c==1 && d%2==0) cout<<"YES"<<endl;
        else if(c%2!=0 && d%2!=0) cout<<"YES"<<endl;
        else if(c%2==0 && d%2==0) cout<<"YES"<<endl;
        else cout<<"NO"<<endl;
    }
    return 0;
}

#include<iostream>
#include<string>
using namespace std;
void main(){
	string a;
	cin >> a;
	int sum = 0,sum1=0;
	for (int i = 0; i < a.length(); i++){
		if (a[i] == '-')sum++;
		else sum1++;
	}
	if (sum % 2 == 0)cout << "YES\n";
	else if (sum > 0 && sum1 == 0)cout << "YES\n";
	else if (sum ==sum1)cout << "YES\n";
	else if (sum1 == 1 && sum > 0)cout << "YES\n";
	else cout << "NO\n";
}

#include<bits/stdc++.h>
using namespace std;
main(){
string s;
cin>>s;
int links=0;
int pearls=0;
for(int i=0;s[i]!='\0';i++){
    if(s[i]=='o')
        pearls++;
    else if(s[i]=='-')
        links++;
}
if(pearls==0 || links==0 || pearls==links || pearls==1 )
    cout<<"YES"<<endl;
else if(links>pearls|| links%pearls==0)
        cout<<"YES"<<endl;
else
cout<<"NO"<<endl;
}

#include<bits/stdc++.h>
using namespace std;
int main()
{
    string s;
    cin >> s;
    int a,b;
    for(int i=0;i<s.size();i++)
    {
        if(s[i]=='-')
        {
            a++;
        }
        else
        {
            b++;
        }
    }
    if(a%b==0)
    {
        cout << "YES" << endl;
        return 0;
    }
    cout << "NO" << endl;
    return 0;
}

#include <bits/stdc++.h>
using namespace std;
int main(){
	int a=0,b=0;
	string s;
	cin>>s;
	for(int i=0;i<s.size();i++){
		if(s[i]=='o'){
			a++;
		}
		if(s[i]=='-'){
			b++;
		}
	}
	if(b%a==0 or a>=1){
		cout<<"YES";
	}
	else{
		cout<<"NO";
	}
}

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

int main()
{
    char ip[500];
    cin>>ip;

    int pCount=0,lcount=0;

    int len = strlen(ip);

    for(int i=0 ; i<len ; i++)
    {
        if(ip[i] == '-')
            lcount++;
        else
        if(ip[i] == 'o')
            pCount++;

    }

    if((pCount==0 || lcount==0 ) && (lcount!=1 && pCount!=1))
        cout<<"YES";
    else
    {
        if(((lcount%pCount)%2==0 ) && (lcount!=1 && pCount!=1))
            cout<<"YES";
        else
            cout<<"NO";
    }
}

#include<bits/stdc++.h>
using namespace std;
int main()
{
    string s;
    cin>>s;
    int i,link=0,perl=0,l=s.length();
    for(i=0;i<l;i++)
    {
        if(s[i]=='-')
            link++;
        else
            perl++;
    }
    if(perl==0||link==0)
        cout<<"YES";
    else if(link==1&&perl>2)
        cout<<"NO";
    else if(link%perl==0||perl%link==0)
        cout<<"YES";
    else
        cout<<"NO";
}

#include <stdio.h>
#include <stdlib.h>

int main()
{
    int i=0,p=0,l=0;
   char ch[101];
   scanf("%s",ch);
   while(ch[i]!='\0'){
    if(ch[i]=='o')p++;
    else l++;
    i++;
   }
     if(p==0){printf("NO");return 0;}
   if(l==0||p==1||l%p==0)printf("YES");
   else printf("NO");

    return 0;
}

#include <iostream>
using namespace std;

int main() {
	// your code goes here
	char ch[100];
	int d=0, o=0,i;
	cin>>ch;
	for(i=0;ch[i]!='\0';i++)
	{
		if(ch[i]=='-')
		d++;
		else
		o++;
	}
	if(o==0)
	cout<<"NO";
	else
	if(d%o==0)
	cout<<"YES";
	else
	cout<<"NO";
	return 0;
}

#include <stdlib.h>
#include <iostream>
#include <string.h>
#include <algorithm>
#include <sstream>
using namespace std;
#include <cmath>
unsigned long long int f, n, s, s1, s2;
string  ch="";
string table[1000000];
unsigned long long int t[1000];
unsigned long long int t2[1000];

int main()
{

	int n, p;
	int s = 0;
	int s1 = 0;
	int s2 = 0;
	int res = 0;
	cin >> ch;
	int j = 0;
 	for (int i = 0; i < ch.length(); i++)
	{
		if (ch[i]=='-')
		{
			s++;
		}
		else {
			t[j] = s;
			j++;
			s = 0;
		}
	}

	for (int i = 0; i < ch.length(); i++)
	{
		if (ch[i] == '-')
		{
			s1++;
		}
		if (ch[i] == 'o')
		{
			s2++;
		}

	}
	res = s1 - s;

	for (int i = 0; i < j-1; i++)
	{
		if (t[i]!=t[i+1])
		{
			cout << "no";
			return 0;
		}
	}

	cout << "yes";

 }

#include <unordered_set>
#include <algorithm>
#include <iostream>
#include <iomanip>
#include <fstream>
#include <string>
#include <vector>
#include <deque>
#include <queue>
#include <cmath>
#include <ctime>
#include <map>
#include <set>
using namespace std;

#define __int64 long long
#define ll long long

int main()
{
	ios_base::sync_with_stdio(0);

	cout.tie();

	cin.tie();

	 cout << "YES";

	return 0;
}

#include<bits/stdc++.h>

using namespace std;

int main()
{
    string s;
    cin >> s;
    int k=s.size(),c=0,m;
    for(int i=0; i<k; i++)
    {
        if(s[i]=='o')
            c++;
    }
    if((k-c)==c || k==c || c==1)
    {
        printf("YES");
        return 0;
    }
    else
    {
        for(int i=0;; i++)
        {

            int s=i+2;
            m=c*s-s+2*s-2;
            if(m>(k-c))
                break;
            else if(m==(k-c))
            {
                printf("YES");
                return 0;
            }
        }
    }
    printf("NO");
    return 0;
}

#include <bits/stdc++.h>
using namespace std;
int main (){
	int dzafi=0;
	string s;
	cin>>s;
	int n=s.size();
	for (int k=0;k<n;k++)
		if (s[k]=='-') dzafi++;
	if (dzafi%2==0) cout<<"YES";
		else cout<<"NO";
}

#include<bits/stdc++.h>
#include<string>
using namespace std;
int main()
{
	string necklace;
	fflush(stdin);
	cin>>necklace;
	int n=necklace.size(),Dem1=0,Dem2=0;
	for(int i=0;i<n;++i)
	{
		if(necklace.at(i)=='-')
			Dem1++;
		else
			Dem2++;
	}
	if(Dem1==n||Dem2==n)
		cout<<"true";
	else if(Dem1==Dem2)
		cout<<"true";
	else if(Dem1>Dem2 && Dem1%Dem2==0)
		cout<<"true";
	else if(Dem1<Dem2 && Dem2%Dem1==0)
		cout<<"true";
	else
		cout<<"false";
	return 0;
}

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

int main()
{
	string s;
	cin >> s;
	int len = s.size();
	int n=0,j=0;;
	for(int i=0;i<len;i++)
	{
		if(s[i]=='-') n++;
		else if(s[i]=='o') j++;
	}
	//cout << n << " " << j*2 << endl;
	if(j==1) cout << "YES" << endl;
	else if(n&2!=0 && j>0) cout << "NO" << endl;
	else cout << "YES" << endl;
}

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

#define ll long long

int main()
{
    ll i,j,k;
    string s;
    while(cin>>s)
    {
        ll d=0,c=0;
        for(i=0;i<s.length();i++)
        {
            if(s[i]=='-') d++;
            else c++;
        }
        if(d==0 || c==0) cout<<"YES"<<endl;
        else if(c==1 && d%2==0) cout<<"YES"<<endl;
        else if(d==1 && c%2==0) cout<<"YES"<<endl;
        else if(c%2!=0 && d%2!=0) cout<<"YES"<<endl;
        else if(c%2==0 && d%2==0) cout<<"YES"<<endl;
        else cout<<"NO"<<endl;
    }
    return 0;
}

#include<iostream>
#include<cstring>
using namespace std;
int main()
{
   char str[101];
   cin>>str;
   int i,len,p=0,l=0;
   len=strlen(str);
   for(i=0;i<len;i++)
   {
   	if(str[i]=='-')
   		l++;
   	else if(str[i]='o')
   		p++;
   }
   if(l==0||p==0)
   {
   	cout<<"YES";
   }
   else if(l%p==0||p%l==0)
   {
   	printf("YES");
   }
   else
   {
   	printf("NO");
   }

  return 0;

}

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

int main()
{
   string a;
   cin>>a;
   int x,y;
   x=y=0;
   for(int i=0;i<a.length();i++){
    if(a[i]=='-')y++;
    if(a[i]=='o')x++;
   }
   if(x){if(y%x==0)cout<<"YES"<<endl;return 0;}
  else cout<<"NO"<<endl;
   return 0;
}

#include <stdio.h>
#include <string.h>
#include <math.h>
#include <stdlib.h>
#include <algorithm>
#include <queue>
#include <map>
#include <vector>
using namespace std;
int main()
{
	int i, n;
	char s[105];
	scanf("%s", s);
	n = strlen(s);
	int count1 = 0,count2 = 0;
	for(i = 0 ; i < n ; i++)
	{
		if(s[i] == 'o')count1++;
		else count2++;
	}
	if(count2 % (count1 + 1) == 0)
	{
		printf("YES\n");
	}
	else
	{
		if(count2 == 0 || count1 == 1)
		{
			printf("YES\n");
		}
		else
		{
			printf("NO\n");
		}
	}
	return 0;
}

#define __USE_MINGW_ANSI_STDIO 0

#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef pair < int , int > ii;
typedef vector < ii > vii;
typedef vector < bool > vb;
typedef vector < int > vi;
typedef vector < ll > vll;
typedef vector < string > vs;
typedef vector < vll > matrix;

#define DF cout
#ifdef SGD
#define D(...) DF << "[" << #__VA_ARGS__ << "]:", debug_out(__VA_ARGS__)
#else
#define D(...) 404
#endif
#ifdef SGD
#define PERF cerr << "Case #" << (tt+1) << " " << 1.0 * (clock() - t1) / CLOCKS_PER_SEC << " ms" << endl;
#else
#define PERF
#endif

string to_string(string s) { return '"' + s + '"'; }
string to_string(const char* s) { return to_string((string) s); }
string to_string(bool b) { return (b ? "true" : "false"); }
template <typename A, typename B> string to_string(pair<A, B> p) { return "(" + to_string(p.first) + ", " + to_string(p.second) + ")"; }
template <typename A> string to_string(A v) { bool first=true; string res="{"; for (const auto &x : v) { if (!first) res+=", "; first=false; res+=to_string(x); } res+="}"; return res; }
void debug_out() { DF << endl; }
template <typename Head, typename... Tail> void debug_out(Head H, Tail... T) { DF << " " << to_string(H); debug_out(T...); }

#define sz(a) int((a).size())
#define pb push_back
#define F first
#define S second
#define all(c) (c).begin(),(c).end()
#define rall(c) (c).rbegin(),(c).rend()
#define tr(con,it) for (__typeof((con).begin()) it = con.begin(); it != con.end(); it++)
#define wl(x) (cout << (x) << endl)
#define w(x) (cout << (x))
#define r(x) (cin >> (x))
#define FOR(i,a,b) for (auto i = (a); i < (b); i++)
#define ROF(i,a,b) for (auto i = (b-1); i >= (a); i--)
#define mp(x,y) make_pair((x),(y))
#define reset(x,v) memset((x),(v),sizeof(x))
#define LSOne(S) (S & (-S))
#define MAXN 100005
#define MAXK 22
#define MDL 1000000007
#define INF 1ll<<60
#define EPS 1e-10
#define IO ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);

string to_str(const int &n){ostringstream stm; stm << n;return stm.str();}
string to_str(const ll &n){ostringstream stm; stm << n;return stm.str();}
template<class T> string tostring(T x, int len = 0) {stringstream ss; ss << x; string r = ss.str(); if(sz(r) < len) r = string(len - sz(r), '0') + r; return r;}
template<class T> void convert(string x, T& r) {stringstream ss(x); ss >> r;}
ll powmod(ll a,ll b) {ll res=1;a%=MDL;for(;b;b>>=1){if(b&1)res=res*a%MDL;a=a*a%MDL;}return res;}
ll modinv(ll a) { return powmod(a, MDL-2); }
ll modinv(ll a,ll m) { return powmod(a, m-2); }
ll nCkMp(ll n, ll k) { ll numerator = 1,denominator = 1;for (int i=0; i<k; i++) numerator = (numerator * (n-i) ) % MDL;for (int i=1; i<=k; i++) denominator = (denominator * i) % MDL;return (numerator*modinv(denominator)) % MDL; }
ll gcd(ll a,ll b) {return b==0?a:gcd(b,a%b);}
ll lcm(ll a,ll b) {return a*(b/gcd(a,b));}
int TT=1,tt;
clock_t t1;

void solve() {t1=clock();
int a=0,b=0;
string s;

 r(s);
 FOR(i,0,sz(s)) if (s[i]=='-') a++; else b++;
 if (b<2) wl("YES");
 else if (a=1) wl("NO");
 else if (a%b==0) wl("YES");
 else if (b%a==0) wl("YES");
 else wl("NO");

PERF}

int main() {IO
//r(TT);
 for(tt=0;tt<TT;tt++) solve();
 return 0;
}

#include <iostream>
#include <math.h>
using namespace std;

int main()
{
    string s;
    double m=0,n=0;
    cin>>s;
    for(int i=0;i<s.length();i++)
    {
        if(s[i]=='o')
            m++;
        else
            n++;
    }
    double k=n/m;
    int x=n/m;
    if(k>x)
        cout<<"NO"<<endl;
    else if(m>n)
        cout<<"NO"<<endl;
    else if(m==0)
        cout<<"NO"<<endl;
    else if(n==0)
        cout<<"YES"<<endl;
    else
        cout<<"YES"<<endl;
    return 0;

}

#include <iostream>
#include <string>
using namespace std;

int main()
{
	//freopen("in.txt","r",stdin);
	string s;
	while(cin>>s)
	{
		int cnt=0;
		for(int i = 0 ; i < s.size() ; i++)
		{
			if(s[i]=='-')
				cnt++;
		}
		if(cnt==s.size())
		{
			cout<<"YES"<<endl;
			continue;
		}
		if(cnt==s.size()-cnt)
		{
			cout<<"YES"<<endl;
			continue;
		}
		if(cnt%2==0)
		{
			cout<<"YES"<<endl;
		}
		else
		{
			cout<<"NO"<<endl;
		}
	}
	return 0;
}

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

main()
{
      int n=0,b=0;
      string s;

      cin>>s;

      for(int i=0;s[i]!='\0';i++)
      {
         if(s[i]=='-')
         n++;
        else
        b++;
      }
      if(b==0||n%2==0)
      cout<<"YES";
          else
            cout<<"NO";
      }

#include<bits/stdc++.h>
#define PI acos(-1)

using namespace std;

int main()
{

    char str[110];
    int cntLinks=0, cntPearls=0;

    scanf("%s", str);

    int n=strlen(str);

    for(int i=0;i<n;i++)
    {
        if(str[i]== 'o')
            cntPearls++;
        else if(str[i]== '-')
            cntLinks++;
    }

    if(cntLinks==0 || cntPearls==0)
    {
        printf("YES\n");
        return 0;
    }

    if(cntLinks==1)
    {
        printf("NO");
        return 0;
    }

    if(cntLinks>=cntPearls)
    {
        if(cntLinks%cntPearls==0)
            printf("YES");
        else
            printf("NO");
    }
    else if(cntLinks<cntPearls)
    {
        if(cntPearls%cntLinks==0)
            printf("YES");
        else
            printf("NO");
    }

    return 0;

}

#include <bits/stdc++.h>

using namespace std;

/*
bool desc (pair <char, long long>& a, pair <char, long long>& b)
{
    //return ((a.second > b.second)
    //      ||
    //    ((a.second == b.second) && (a.first < b.first))
    //  );

    if (a.first == b.first)
        return a.second > b.second;
    return a.first < b.first;
}

bool desc2 (set <long long> &a, set <long long> &b) {
    return a.size() < b.size();
}

int binary (vector <long long> v, long long n, long long x)
{
    long long st = 0, en = n;
    while (st <= en)
    {
        long long mid = st + (en - st) / 2;
        if (v[mid] == x)
        {
            return mid;
        }
        if (v[mid] < x)
        {
            st = mid + 1;
        }
        else if (v[mid] > x)
        {
            en = mid - 1;
        }
    }
    //return mid;
}

int arr[100001];
void sieve ()
{
    arr[0] = 1;
    arr[1] = 1;
    for (long long i = 2; i < 100001; i ++)
    {
        if (arr[i] == 0)
        {
            for (long long j = i * 2; j < 100001; j += i)
            {
                arr[j] = 1;
            }
        }
    }
}

bool isPrime(long long n)
{
    // Corner cases
    if (n <= 1)
        return false;
    if (n <= 3)
        return true;

    // This is checked so that we can skip
    // middle five numbers in below loop
    if (n % 2 == 0 || n % 3 == 0)
        return false;

    for (long long i = 5; i * i <= n; i = i + 6)
        if (n % i == 0 || n % (i + 2) == 0)
            return false;

    return true;
}
long long hcf(long long a, long long b)
{
    if (b == 0)
        return a;
    return hcf(b, a % b);

}

long long w = 12, n = 5;
long long DP[10001][10001];
long long W[5] = {10, 4, 20, 5, 7};
long long C[5] = {10, 15, 3, 1, 4};
long long knapsack (long long i , long long rem)
{
    if (i == n) {
        return 0;
    }
    //if (DP[W[i]][C[i]] != -1) {
      //  return DP[W[i]][C[i]];
    //}
    long long c1 = knapsack(i + 1, rem), c2;
    if (W[i] <= w) {
        c2 = knapsack(i + 1, rem - W[i]) + C[i];
    }
    return max(c1, c2);
}
*/

long long hcf(long long a, long long b)
{
    if (b == 0)
        return a;
    return hcf(b, a % b);

}

int main()
{
    cin.tie(0);
    ios::sync_with_stdio(0);
    cout.tie(0);
    // 8 2 5 7 8 12 20 1 3 15
    //freopen("aplusb.in", "r", stdin);
    //freopen("aplusb.out", "w", stdout);

    string s;
    long long p = 0, l = 0;
    cin >> s;
    for (long long i = 0; i < s.size(); i ++) {
        if (s[i] == 'o') {
            p ++;
        }
        else {
            l ++;
        }
    }
    if (min(l, p) == 0) {
        cout << "YES\n";
    }
    if (l % p == 0) {
        cout << "YES\n";
    }
    else {
        cout << "NO\n";
    }
    return 0;
}

#include <iostream>
#include <cstring>

using namespace std;

string s;
int ok,n;

int main()
{
    cin>>s;
    for(int i=0;i<=s.size()-1;i++){
        if(s[i]=='-'){
            ok++;
        }
        else
            n++;
    }
    if(n!=0){
        if(ok%n==0 || n%ok || ok==0)
            cout<<"Yes";
        else
            cout<<"No";
    }
    else
        cout<<"Yes";
    return 0;
}

#include <iostream>
#include <string>
using namespace std;

int main()
{
    string s;
    cin >> s;
    int i;
    int a = 0, b = 0;
    for(i = 0; i < s.size(); i++)
    {
        if(s[i] == 'o')
            a++;
        else
            b++;
    }
    if(a == 0)
    {
        cout << "NO";
        return 0;
    }
    else if(a == 1)
    {
        cout << "YES";
        return 0;

    }
    else if( b % a == 0)
    {
        cout << "YES";
        return 0;
     }
    else
        cout << "NO";
    return 0;
}

#include <bits/stdc++.h>

using namespace std;
string s;
long double b, n;

int main()
{
  //  freopen("input.txt","r",stdin);
   // freopen("output.txt","w",stdout);
    cin >> s;
    for (int i = 0; i < s.size(); i++) {
        if (s[i] == 'o')
            b++;
        if (s[i] == '-')
            n++;

    }

    if (n == 0) {
        cout << "YES";
        return 0;
    }
    if (n < b) {
        cout << "NO";
        return 0;
    }
    if (b == 0 || b == 1) {
        cout << "NO";
        return 0;
    }
    long double x;
    x = n / b;
  //  cout << x;
   if ((int)x == x)
        cout << "YES";
    else
        cout << "NO";

    return 0;
}

#include <bits/stdc++.h>
using namespace std;
int main()
{
int c1=0,c2=0;
string ch;
cin>>ch;
for(int i=0;i<ch.length()-1; i++) {
	if(ch[i]=='-'){
		c2++;}
	else{
		c1++;}}
cout<<c1<<" "<<c2;
if((c2>=c1 && c2 % c1 == 0) || (c2==0 ) ||(c1==0))
	cout<<"YES";
else
	cout<<"NO";
}

#include<bits/stdc++.h>

using namespace std;
string s;
map<char,int>st;
int main(){
    cin>>s;
    for(int i=0;i<s.size();i++){
        st[s[i]]++;
    }
    if(st['-']%2==0)
        cout<<"YES"<<endl;
    else
        cout<<"NO"<<endl;
    return 0;
}

/*"Nothing is true."*/
#include<bits/stdc++.h>
using namespace std;
inline int min(int _a, int _b) {return _a < _b ? _a : _b;}
inline int max(int _a, int _b) {return _a > _b ? _a : _b;}
const int inf = 0x3f3f3f3f;
const double eps = 1e-8;

template <class _T> inline void rd(_T &_a) {
	int _f=0,_ch=getchar();_a=0;
	while(_ch<'0' || _ch>'9'){if(_ch=='-')_f=1;_ch=getchar();}
	while(_ch>='0' && _ch<='9')_a=(_a<<1)+(_a<<3)+_ch-'0',_ch=getchar();
	if(_f)_a=-_a;
}

char s[200];
int a, b, c;
int main() {
	//freopen("a.in","r",stdin);
	//freopen("a.out","w",stdout);
	scanf("%s", s);
	c = strlen(s);
	for(int i = 0;i < c; ++i) {
		if(s[i] == '-') ++a;
		else ++b;
	}
	if(b == 0) puts("NO");
	else if(a == 0) puts("YES");
	else if(a % b) puts("NO");
	else puts("YES");
	return 0;
}

#include <iostream>
#include <string>
using namespace std;
int main()
{

	int n = 0;
	int p = 0;
	string s;

	getline(cin,s);
	for (int i =0;i<s.length();i++) {
		if (s[i] == 'o') {
			p++;
		}
		else if (s[i] == '-') {
			n++;
		}
	}
	if ( p == 0)
	{
	    cout<<"NO";
	}else
	if (n%p == 0)
	{
		cout <<"YES";
	}
	else {
		cout << "NO";
	}
	return 0;
}

#include <iostream>
#include <vector>
#include <algorithm>
#include <iterator>
#include <array>
#include <map>
#include <stack>
#include <queue>
#include <set>
#include <cmath>
#include <numeric>

using namespace std;

int main() {

    ios_base::sync_with_stdio(false);
    cin.tie(NULL);

    string s;

    cin >> s;

    int numOfPearl, numOfLine;
    for (int i = 0; i < s.length(); ++i) {
        if (s[i] == 'o') {
            numOfPearl += 1;
        } else {
            numOfLine += 1;
        }
    }

    string result = "NO";
    if (numOfLine == 0) {
        result = "YES";
    } else if (numOfLine % numOfPearl == 0) {
        result = "YES";
    }

    cout << result << "\n";

}

#include<bits/stdc++.h>
using namespace std;
int main(){
	string a;
	cin>>a;
	int b,c;
	for(int i=0;i<a.length();i++){
		if(a[i]=='o') b++;
		if(a[i]=='-') c++;
	}
	if(c%b==0) cout<<"YES"<<endl;
	else cout<<"NO"<<endl;
return 0;
}

#include <bits/stdc++.h>

#define YOU using
#define DONT namespace
#define SAY std

YOU DONT SAY;

typedef long long ll;
typedef unsigned long long ull;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef pair<ll,int> pli;
typedef pair<int,ll> pil;
typedef vector<int> vi;
typedef vector<pii> vii;
typedef vector<pll> vll;

#define REPP(i,a,b,d) for(int i=a;i<=b;i+=d)
#define REP(i,a,b) REPP(i,a,b,1)
#define REVV(i,a,b,d) for(int i=a;i>=b;i-=d)
#define REV(i,a,b) REVV(i,a,b,1)

#define FOR(i,a) for(int i=0; i<a; i++)
#define FORD(i,a) for(int i=(int)a-1; i>=0; i--)

#define mp make_pair

#define pb push_back
#define F first
#define S second

const int OO = 1e9;
const ll INF = 1e18;

const int irand(int lo,int hi){
	return ((double)rand()/(RAND_MAX + 1.0)) * (hi-lo+1) + lo;
}

const ll lrand(ll lo,ll hi){
	return ((double)rand()/(RAND_MAX + 1.0)) * (hi-lo+1) + lo;
}

#define getc getchar
template<typename T>
T getnum(){
	int sign = 1;
	T ret = 0;
	char c;

	do{
		c = getc();
	}while(c == ' ' || c == '\n');
	if(c == '-')sign = -1;
	else ret = c-'0';
	while(1){
		c = getc();
		if(c < '0' || c > '9')break;
		ret = 10*ret + c-'0';
	}
	return sign * ret;
}

inline void ini(int& x){
	x = getnum<int>();
}

inline void scani(int& x){
	scanf("%d",&x);
}

//end of macro

int main(){
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);

    string str;
    cin>>str;
    int oo = 0;
    FOR(i,str.size()){
        if(str[i] == 'o')oo++;
    }
    if(oo > 0 && str.size() % oo == 0)cout << "YES" << endl;
    else cout << "NO" << endl;

    return 0;
}

#include <iostream>
int o,i;
char c;
main() {
	for(;std::cin>>c;)c=='o'?o++:i++;
	std::cout<<(o%i==0 || !i ||!o ||i%o==0?"YES":"NO");
}

#include <bits/stdc++.h>

using namespace std;

int main()
{
    string s;
    cin>>s;
    int cnt_o=0;
    int cnt_l=0;
    int len=s.length();
    for(int i=0;i<len;i++)
    {
        if(s[i]=='o')
            cnt_o++;
        else
            cnt_l++;
    }
    if(cnt_o!=0)
        if(cnt_l%cnt_o==0)
            cout<<"YES";
    else
        cout<<"NO";
}

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

#define pb push_back
#define MAX INT_MAX

int main(){
	string ent;

	cin >> ent;

	int contl=0, contp=0;

	for(int i = 0; i < ent.size(); i++){
		if(ent[i] == '-')
			contl++;
		else if(ent[i] == 'o')
			contp++;
	}

	if(contl == 0){
	 cout << "YES" << endl;
	} else {
		if(contp == 0) cout << "YES" << endl;
		else
		if(contl%contp != 0) cout << "NO" << endl;
	}
	return 0;
}

#include <bits/stdc++.h>
#define ll long long int
#define mp make_pair
#define pb push_back
using namespace std;
int main () {
  ios::sync_with_stdio(false);
  cin.tie (0);
  string s; cin>>s;
  int lines=0;
  for (int i=0;i<s.size();++i) {
    if (s[i]=='-') lines++;
  }
  cout<<((lines%2==0)? "YES" : "NO");
  return 0;
}

#include<iostream>
#include<string>
#include<vector>
#include<map>
#include<algorithm>
#include<stdio.h>
#include<iostream>
#include<cstdio>
#include<cstring>
#include<set>
#include<math.h>
#include<stack>
#include<sstream>
#include<queue>
#include<list>
#include<iomanip>
#include<bitset>
#include<limits.h>
#define MOD  1000000007
#define BIG  1000000007
#define ii pair<int,int>
#define iii pair<int,pair<int,int> >
#define F first
#define S second
#define PB push_back
#define MP make_pair
#define vi vector<int>
#define pi pair<int,int>
typedef unsigned long long ll;
using namespace std;
int main()
{
    string str ;
    cin >> str ;
    int o = 0 , l = 0 ;
    for(int i =0 ; i<str.size() ; i++ ){
        if(str[i] == 'o')o++;
        else l++ ;
    }
    if(l == 0 || o == 1 || o == 0)puts("yes");
    else if( o%2==0 && l%2==0    )puts("yes");
    else if(o&1 && l&1)puts("yes");
    else puts("no");

return 0 ;
}

#include <unordered_set>
#include <algorithm>
#include <iostream>
#include <iomanip>
#include <fstream>
#include <string>
#include <vector>
#include <deque>
#include <queue>
#include <cmath>
#include <ctime>
#include <map>
#include <set>
using namespace std;

#define __int64 long long
#define ll long long

int main()
{
	ios_base::sync_with_stdio(0);

	cout.tie();

	cin.tie();

	          cout << "YES";

	return 0;
}

#include<cstdio>
#include <iostream>
#include <algorithm>
#include<cstring>
#include<cstdlib>
using namespace std;
int main()
{
   char s[101];
   int n;
   int a=0,b=0;
   gets(s);
   n=strlen(s);
   for(int i=0;i<n;i++)
    {
	   if(s[i]=='-')
		   a=a+1;
	   else if(s[i]=='o')
		   b=b+1;
      }
   if(b!=0)
   {
   if(a%b==0)
	   printf("YES\n");
   else if(a%b!=0)
	   printf("YES\n");
   }

   else if(b==0)
	    printf("NO\n");
   return 0;
}

#include <bits/stdc++.h>
/*#include <ext/pb_ds/assoc_container.hpp>	// Common file
#include <ext/pb_ds/tree_policy.hpp> 		// Including */
using namespace std;
//using namespace __gnu_pbds;
/*
template<typename T>
using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
template<typename F, typename S>
using ordered_map = tree<F, S, less<F>, rb_tree_tag, tree_order_statistics_node_update>;
*/

typedef long long ll;
typedef vector <int> vi;
typedef vector <ll> vl;
typedef vector <vi> vvi;
typedef vector <vl> vvl;
typedef pair <int,int> pii;
typedef pair <double, double> pdd;
typedef pair <ll, ll> pll;
typedef vector <pii> vii;
typedef vector <pll> vll;
typedef vector<int>:: iterator vit;
typedef set<int>:: iterator sit;

const double PI  =      acos(-1.0);
const double eps =      1e-8;
const long inf   =      0x3f3f3f3f;
const ll infLL   =      (1ll << 62);
const double oo  =      1e15;

#define FOR(i,a,b)      for(i = a; i <= b; ++i)
#define REP(i,a,b)      for(i = a; i >= b; --i)
#define pb              push_back
#define eb              emplace_back
#define F               first
#define S               second
#define all(a)          a.begin(),a.end()
#define mp              make_pair
#define endl            '\n'
#define pf              printf
#define sf              scanf
//#define left            __left
//#define right           __right
//#define tree            __tree
#define inp(f)         freopen(f,"r",stdin)
#define out(f)         freopen (f,"w",stdout)
#define CHAR            getchar()
#define mxe(a,n)        (*max_element(a,a+n))
#define mne(a,n)        (*min_element(a,a+n))
#define SUM(a,n)        (accumulate(a,a+n,0)) // returns sum of all the values in the array //
#define countbit(x)     __builtin_popcountll(x) // counts number of 1's in binary representation //
#define trail_zero(x)   __builtin_ctz(x)
//#define MOD             1000000007
#define RESET(a,b)      memset(a,b,sizeof(a))
#define CLR(a)          memset(a,0,sizeof(a))
#define SET(a)          memset(a,-1,sizeof(a))
#define gcd(a,b)        __gcd(a,b)
#define lcm(a,b)        (a * (b / gcd(a,b)))
#define sqr(a)          ((a) * (a))
#define max(a,b)        ((a) > (b) ? (a) : (b))
#define min(a,b)        ((a) < (b) ? (a) : (b))
#define abs(a)          ((a) < 0 ? (-(a)): (a))
//#define harmonic(n)     0.57721566490153286l+log(n)
#define optimize()      ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define fraction()      cout.unsetf(ios::floatfield); cout.precision(10); cout.setf(ios::fixed,ios::floatfield);
#define what_is(x)      cerr << #x << " is " << x << endl;

/*----------------------Graph Moves----------------*/
//const int fx[] = {+1, -1, +0, +0};
//const int fy[] = {+0, +0, +1, -1};
//const int fx[] = {+0, +0, +1, -1, -1, +1, -1, +1};   	// Kings Move
//const int fy[] = {-1, +1, +0, +0, +1, +1, -1, -1};  	// Kings Move
//const int fx[] = {-2, -2, -1, -1,  1,  1,  2,  2};	// Knights Move
//const int fy[] = {-1,  1, -2,  2, -2,  2, -1,  1};	// Knights Move
/*------------------------------------------------*/

inline bool     checkBit (ll n, int i) { return n&(1LL<<i); }
inline ll       setBit (ll n, int i) { return n|(1LL<<i);; }
inline ll       resetBit (ll n, int i) { return n&(~(1LL<<i)); }
inline bool     EQ (double a, double b) { return fabs(a-b) < 1e-9; }
inline bool     isLeapYear (ll year) { return (year%400==0) || (year%4==0 && year%100!=0); }
inline bool     isInside (pii p,ll n,ll m) { return (p.first>=0&&p.first<n&&p.second>=0&&p.second<m); }
inline bool     isInside (pii p,ll n) { return (p.first>=0&&p.first<n&&p.second>=0&&p.second<n); }
inline bool     isSquare (ll x) { ll s = sqrt(x);	return (s*s==x); }
inline bool     isFib (ll x) { return isSquare(5*x*x+4)|| isSquare(5*x*x-4); }
inline bool     isPowerOfTwo (ll x) { return (x && !(x & (x - 1))); }
inline void     normal (ll &a, ll MOD) { a %= MOD; (a < 0) && (a += MOD); }
inline ll       modMul (ll a, ll b, ll MOD) { a %= MOD, b %= MOD; normal(a, MOD), normal(b, MOD); return (a*b)%MOD; }
inline ll       modAdd (ll a, ll b, ll MOD) { a %= MOD, b %= MOD; normal(a, MOD), normal(b, MOD); return (a+b)%MOD; }
inline ll       modSub (ll a, ll b, ll MOD) { a %= MOD, b %= MOD; normal(a, MOD), normal(b, MOD); a -= b; normal(a, MOD); return a; }
inline ll       modPow (ll b, ll p, ll MOD) { ll r = 1; while(p) { if(p&1) r = modMul(r, b, MOD); b = modMul(b, b, MOD); p >>= 1; } return r; }
inline ll       modInverse (ll a, ll MOD)   { return modPow(a, MOD-2, MOD); }
inline ll       modDiv (ll a, ll b, ll MOD) { return modMul(a, modInverse(b, MOD), MOD); }

// sum..
int sum() { return 0; }
template<typename T, typename... Args>
T sum(T a, Args... args) { return a + sum(args...); }
// eg: cout << sum(2, 3, 5, 9) + sum(5.9); print : 24.9

struct func {
	//this is a sample overloading function for sorting stl
	bool operator()(pii const &a, pii const &b) {
		if(a.F==b.F)
			return (a.S<b.S);
		return (a.F<b.F);
	}
};
/*
// Find the largest power of 2 (most significant bit in binary form), which is less than or equal to the given number N.

ll  largestPower(ll n){
	for(int i = 0; i <= sizeof(n); ++i){
		n = n | (n >> (1 << i));
	}

	return (n + 1) >> 1;
}
*/

int main(){
	optimize();
	string str;
	int cntLn = 0, cntP = 0;
	cin >> str;
	for(int i = 0; i < str.size(); ++i){
		if(str[i] == '-'){
			cntLn++;
		}
		if(str[i] == 'o'){
			cntP++;
		}
	}
	if(cntP == 1){
		cout << "YES\n";
		return 0;
	}
	if((cntLn % 2 == 0  and cntP % 2 == 0) || cntP == 0 || (cntP % 2 and cntLn % 2) || cntLn == 0){
		cout << "YES\n";
	}
	else{
		cout << "NO\n";
	}
	return 0;
}

#include<bits/stdc++.h>
using namespace std;
string str;
int main()
{
	cin>>str;
	int cnt = 0, ans = 0;
	bool f = 1;
	for(int i = 0; i < str.size(); i++)
		if(str[i] == 'o')
			++cnt;
		else
			++ans;
	if(!cnt&&ans){
		cout<<"YES";exit(0);
	}
	if(ans%2==0)
		printf("YES");
	else
		printf("NO");

	return 0;
}

#include <iostream>
#include <string>

using namespace std;

int main()
{
    string s;
    cin >> s;
    int b, l;
    b = 0;
    l = 0;
    for(int i = 0; i < s.length(); i++){
        if(s[i] == '-') l++;
        else b++;
    }
    string r = "no";
    if(l > b){
        if(b == 0 || l % b == 0) r = "yes";
    }else{
        if(l == 0 || b % l == 0) r = "yes";
    }
    cout << r;
    return 0;
}

#include<bits/stdc++.h>
using namespace std;
#define     ll           long long
#define     sf(n)        scanf("%lld",&n)
#define     pf(n)        printf("%lld\n",&n)
#define     ct(p)        cout<<p<<endl
#define     mem(a)       memset(a,0,sizeof a)
#define     yes          cout<<"YES"<<endl
#define     no           cout<<"NO"<<endl
ll a[100000];
map<char,ll>mp;
map<ll,ll>mp1;

///......................................///

int main()
{
    cin.sync_with_stdio(false);
    ll i,j,k,l,c,v,b,bv[1000],aa[1009],bb[1000],n,m,r,t,e,f;
    ll x1,x2,y1,y2,x3,x4,x5,x6;

    string s,s1,s2,s5[1000];
    char ss[109][109];
    c=0;
    j=0;
    while(cin>>s)
    {
       if(s[i]=='o')
        c++;
        else
            j++;

    }
    if(j%2==0)
        yes;
        else
            no;
}

#include<bits/stdc++.h>
using namespace std;
int main()
{
    string s;
    int cnt=0,dif=0,x=0,y=0,cn=0,j=0,c=0,div,sum=0,i,pos;
    cin>>s;
    for(i=0;i<s.size();i++)
    {
        if(s[i]=='-')
            cnt++;
        if(s[i]=='o')
            cn++;
            if(x==0&&s[i]=='o')
            {

               j++;
               pos=j;

            }
    }
    if(cnt==s.size()||cn==s.size())
    {
        cout<<"YES"<<endl;
        return 0;
    }
    div=cn/2;
    while(s[pos]!='o')
    {
        c++;
        pos++;
    }

    sum=div*c;
    dif=cnt-sum;
    if(dif>=sum){
        cout<<"YES"<<endl;
        return 0;
    }
    cout<<"NO"<<endl;
    return 0;
}

#include <stdio.h>
  char c[115];
int main()
{  int a,b=0,d=0;

    scanf("%s",c);
    for(a=0;a<=99;a++)
    {
        if(c[a]=='o')
            b++;
            else if(c[a]=='-')
                d++;
    }
    if(b==0)
    printf("NO");
else if(d%b==0)
    printf("YES");
else
    printf("NO");

    return 0;

}

#include<bits/stdc++.h>
using namespace std;
int main(){
    string s;
    int a=0;
	int b=0;
    for (int i=0;cin>>s;i++){
    	if (s[i]=='o'){
    		a++;
		}
        else if (s[i]=='-'){
        	b++;
		}
	}
    if (a==0){
        cout<<"YES"<<endl;
        return 0;
    }
    if (a%b==0){
    	cout<<"YES"<<endl;
	}else{
		cout<<"NO"<<endl;
	}
    return 0;
}

#include <bits/stdc++.h>

using namespace std;
string s;
long double b, n;

int main()
{
  //  freopen("input.txt","r",stdin);
   // freopen("output.txt","w",stdout);
    cin >> s;
    for (int i = 0; i < s.size(); i++) {
        if (s[i] == 'o')
            b++;
        if (s[i] == '-')
            n++;

    }

    if (n == 2 && b == 1) {
        cout << "NO";
        return 0;
    }
    if (n == 0) {
        cout << "YES";
        return 0;
    }
    if (n < b) {
        cout << "NO";
        return 0;
    }
    if (b == 0) {
        cout << "NO";
        return 0;
    }
    long double x;
    x = n / b;
  //  cout << x;
   if ((int)x == x)
        cout << "YES";
    else
        cout << "NO";

    return 0;
}

#include<iostream>
#include<string.h>
#include<math.h>
#include<cstdio>
#include<cstring>
#include<set>
#include<vector>
#include<cmath>
#include<algorithm>
#include<map>
#include<queue>
#define inf 2000000000
#define INF 1<<29
#define S(a) scanf("%d",&a)

#define OT(a) printf("%d\n",a)

#define me(a,b) memset(a,b,sizeof(a))
typedef long long ll;
using namespace std;
const int maxn=1e5+1;
const int mo=1e9+7;
inline int read()
{
    int x=0,f=1;char ch=getchar();
    while(ch<'0'||ch>'9'){if(ch=='-')f=-1;ch=getchar();}
    while(ch>='0'&&ch<='9'){x=x*10+ch-'0';ch=getchar();}
    return x*f;
}
ll quickpow(int a,int b){
    ll ans=1,pow=a;
    while(b){
        if(b&1)ans*=pow;
        pow*=pow;
        b>>=1;
    }
    return ans;
}
char s[110];
int main(){
	scanf("%s",s);
	int l=strlen(s);
	int cnt=0;
	for(int i=0;i<l;i++){
		if(s[i]=='o')cnt++;
	}
	if(cnt==0){
		puts("NO");
		return 0;
	}
	else if((l-cnt)%cnt==0)puts("YES");
	else puts("NO");
    return 0;
}

#include <stdlib.h>
#include <iostream>
#include <string.h>
#include <algorithm>
#include <sstream>
using namespace std;
#include <cmath>
unsigned long long int f, n, s, s1, s2;
string  ch="";
string table[1000000];
unsigned long long int t[1000000];
unsigned long long int t2[1000000];

int main()
{

	int n, p;
	int s = 0;
	int s1 = 0;
	int s2 = 0;
	int res = 0;
	cin >> ch;
 	for (int i = ch.length()-1; i >0; --i)
	{
		if (ch[i]=='-')
		{
			s++;
		}
		else {
			break;
		}
	}

	for (int i = 0; i < ch.length(); i++)
	{
		if (ch[i] == '-')
		{
			s1++;
		}
		if (ch[i] == 'o')
		{
			s2++;
		}

	}
	res = s1 - s;

	if ((s>=res)||(s2==0))
	{
		cout << "yes";

	}
	else{
		cout << "no";
	}
 }

#include<bits/stdc++.h>

using namespace std;

int main()
{
    string s;
    cin >> s;
    int k=s.size(),c=0,m;
    for(int i=0; i<k; i++)
    {
        if(s[i]=='o')
            c++;
    }
    if((k-c)==c || k==c || c==1)
    {
        printf("YES");
        return 0;
    }
    else
    {
        for(int i=0;; i++)
        {

            int s=i+2;
            m=c*s-s+2*s-2;
            if(m>(k-c))
                break;
            else if(m==(k-c))
            {
                printf("YES");
                return 0;
            }
        }
    }
    printf("NO");
    return 0;
}

#include<bits/stdc++.h>
using namespace std;
unsigned long long x,y;
char a;
int main()
{
    while(cin>>a)
    {
        if(a=='O')x++;
        else if(a=='-')y++;
    }
    if(x==0)
    {
        cout<<"YES"<<endl;
        return 0;
    }
    else
    {
        if(y%x==0)cout<<"YES"<<endl;
        else cout<<"NO"<<endl;
    }
    return 0;
}

#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#include <ext/pb_ds/trie_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> pbds;
typedef trie<string, null_type, trie_string_access_traits<>, pat_trie_tag, trie_prefix_search_node_update> pref_trie;
typedef unsigned long long BITMASK; typedef long long ll; typedef long double ld;
#define has_bit(bit_mask, x) ((bit_mask) & (1Uint << (x)))
#define turn_on_bit(bit_mask, x) (bit_mask |= (1Uint << (x)))
#define turn_off_bit(bit_mask, x) (bit_mask &= (~(1Uint << (x))))
#define smallest_on_bit(bit_mask) (__builtin_ctzint((bit_mask) & (-(bit_mask))))
#define CLOCK_START clock_t chrono_clk_beg = clock()
#define CLOCK_END clock_t chrono_clk_end = clock(); cerr << (double(chrono_clk_end - chrono_clk_beg) / CLOCKS_PER_SEC) << " sec"
#define bug(args ...) cerr << __LINE__ << ">> ", err(new istringstream(string(#args)), args), cerr << '\n'
void err(istringstream *iss) {} template<typename T, typename ... Args> void err(istringstream *iss, const T &_val, const Args & ... args) { string _name; *iss >> _name; if (_name.back()==',') _name.pop_back(); cerr << _name << " = " << _val << "; ", err(iss, args ...); }
#define MOD 1000000007

signed main()
{
	ios_base::sync_with_stdio(false); cin.tie(NULL);
	string str;
	cin >> str;
	int pos = -1;
	bool prev = false;
	int x = -1, y = -1;
	for (int i = 0; i <= str.size(); ++i)
	{
		if (i == str.size() || str[i] == 'o')
		{
			int length = i-pos-1;
			if (prev && i != str.size())
			{
				if (x == -1) x = length;
				else x = min(x, length);
			}
			else
			{
				if (y == -1) y = length;
				else y = min(y, length);
			}
			pos = i;
			prev = true;
		}
	}
	if (x == -1 || y == -1) cout << "YES\n";
	else if (x == 0 && y == 0) cout << "YES\n";
	else if (x > y) cout << "NO\n";
	else cout << "YES\n";
	return 0;
}

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

int main()
{
    char ip[500];
    cin>>ip;

    int pCount=0,lcount=0;

    int len = strlen(ip);

    for(int i=0 ; i<len ; i++)
    {
        if(ip[i] == '-')
            lcount++;
        else
        if(ip[i] == 'o')
            pCount++;

    }

    if(pCount==0 || lcount==0)
        cout<<"YES";
    else
    {
        if((lcount%pCount)%2==0 && lcount!=1 && pCount!=1)
            cout<<"YES";
        else
            cout<<"NO";
    }
}

#include <iostream>
#include <string.h>
using namespace std;
int main()
{
 char a[101];
 cin>>a;
 int k=strlen(a),p=0,l=0,i;
 for(i=0;i<k;i++)
 {
     if(a[i]=='O')
     {
         l++;
     }
     else{
         p++;
     }
 }
 if(l%p==0)
 {
     cout<<"YES";
 }
 else{
     cout<<"NO";
 }
}

#include<iostream>
using namespace std;

int main(){
    string in;
    cin >> in;
    int numPerl = 0;
    int numLaces = 0;
    for(int i = 0; i < in.size();i++){
        if(in[i] == '-'){
            numLaces += 1;
        }
        else{
            numPerl += 1;
        }
    }
    if(numPerl == 0){
        cout << "NO" << endl;
    }
    else if(numLaces == 0){
        cout << "YES" << endl;
    }
    else if(numPerl > numLaces){
        cout << "NO" << endl;
    }
    else if(numLaces % numPerl == 0){
        cout << "YES" << endl;
    }
    else{
        cout << "NO" << endl;
    }
    return 0;
}

#include<iostream>
#include <fstream>
#include <string.h>

using namespace std;

ifstream f("date.in");

char x[101];

int main()
{
    int c=0;
    cin.getline(x, 101);
    for(int i=0; x[i]; i++)
        if(x[i]=='-')
            c++;
    if(c&1)
        cout<<"NO";
    else cout<<"YES";
}

/*"Nothing is true."*/
#include<bits/stdc++.h>
using namespace std;
inline int min(int _a, int _b) {return _a < _b ? _a : _b;}
inline int max(int _a, int _b) {return _a > _b ? _a : _b;}
const int inf = 0x3f3f3f3f;
const double eps = 1e-8;

template <class _T> inline void rd(_T &_a) {
	int _f=0,_ch=getchar();_a=0;
	while(_ch<'0' || _ch>'9'){if(_ch=='-')_f=1;_ch=getchar();}
	while(_ch>='0' && _ch<='9')_a=(_a<<1)+(_a<<3)+_ch-'0',_ch=getchar();
	if(_f)_a=-_a;
}

char s[200];
int a, b, c;
int main() {
	//freopen("a.in","r",stdin);
	//freopen("a.out","w",stdout);
	scanf("%s", s);
	c = strlen(s);
	for(int i = 0;i < c; ++i) {
		if(s[i] == '-') ++a;
		else ++b;
	}
	if(b < 2) puts("NO");
	else if(a == 0) puts("YES");
	else if(a % b) puts("NO");
	else puts("YES");
	return 0;
}

#include<bits/stdc++.h>
#define PI acos(-1)

using namespace std;

int main()
{

    char str[110];
    int cntLinks=0, cntPearls=0;

    scanf("%s", str);

    int n=strlen(str);

    for(int i=0;i<n;i++)
    {
        if(str[i]== '-')
            cntPearls++;
        else if(str[i]== 'o')
            cntLinks++;
    }

    if(cntLinks==0 || cntPearls==0)
    {
        printf("YES\n");
        return 0;
    }

    if(cntLinks>cntPearls)
    {
        if(cntLinks%cntPearls==0)
            printf("YES");
        else
            printf("NO");
    }
    else if(cntLinks<cntPearls)
    {
        if(cntPearls%cntLinks==0)
            printf("YES");
        else
            printf("NO");
    }else
            printf("YES");

    return 0;

}

#include<iostream>
#include<string>
using namespace std;
void main(){
	string a;
	cin >> a;
	int sum = 0;
	for (int i = 0; i < a.length(); i++){
		if (a[i] == '-')sum++;
	}
	if (sum % 2 == 0)cout << "YES\n";
	else cout << "NO\n";
}

#include<bits/stdc++.h>
using namespace std;
int main()
{
    string s;
    cin>>s;
    int l=0,k=0,c=0,a=0;
    for(int i=0;i<s.size();i++)
    {
        if(s[i]=='-')l++;
        else k++;
    }
    for(int i=0;i<s.size();i++)
    {
        if(s[i]=='-')c++;
        else break;
    }
    if(l==0||k<2)cout<<"YES";
    else
    {int f=0;
        for(int i=0;i<s.size();i++)
        {
            if(s[i]=='-')a++;
            else
            {
                if(a==c)a=0;
                else {f++;}
            }
        }
        if(f>=2)cout<<"YES";else cout<<"NO";
    }
}

#include<stdio.h>
#include<iostream>
#include<math.h>
#include<string.h>
#define ll long long
using namespace std;
const int MM=1e6+5;
char s[MM];
int main()
{
    scanf("%s",s);
    int len=strlen(s);
    int sum1=0,sum2=0;
    int s1,s2;
    for(int i=0; i<len; i++)
    {
        if(s[i]=='o')
        {
            sum1++;
        }
        else  if(s[i]=='-')
        {
            sum2++;
        }
    }
    //cout<<sum1<<" "<<sum2<<" "<<endl;
    if(sum1==0||sum2==0)
        printf("YES\n");
    else if(sum1==1&&sum2%2==0)
        printf("YES\n");
    else if(sum2!=1&&sum1==1)
        printf("YES\n");
    else if(sum1!=1&&sum2!=1&&sum1<=sum2)
    {
        s1=min(sum1,sum2);
        s2=max(sum1,sum2);
        if(s2%s1==0)
            printf("YES\n");
        else
            printf("NO\n");
    }
    else if(sum2>sum1)
    {
        printf("NO\n");
    }
    else
    {
        printf("N0\n");
    }
    return 0;
}

#include<bits/stdc++.h>
using namespace std;
int main()
{ string x;
  cin>>x;
  int lenx=x.length();
  int jishu1=0,jishu2=0;
  for(int i=0;i<lenx;i++)
  { if(x[i]=='-') jishu1++;
    else jishu2++;
  }
  if(jishu1==1&&jishu2==1) cout<<"NO"<<endl;
  if(jishu1%jishu2==0) cout<<"YES\n";
  if(jishu2==0) cout<<"NO"<<endl;
  else cout<<"NO\n";
}

#include<bits/stdc++.h>

using namespace std;

#define fast ios_base::sync_with_stdio(false),cin.tie(0),cout.tie(0);
#define ll long long
#define pb push_back
#define pp pop_back
#define mp make_pair
#define ff first
#define ss second

int main()
{
    fast;
    string s;
    cin >> s;
    int i,j=0,k=0,l=0;
    for(i=0;i<s.size();i++)
    {
        if(s[i]=='-')
            j++;
        else
        {
            k++;
            if(s[(i-1+s.size())%s.size()]=='o')
            {
                l=1;
            }
        }
    }
    if(l==1 && j!=0)
    {
        cout << "NO";
        return 0;
    }
    if(k==0 || j==0)
    {
        cout << "YES";
        return 0;
    }
    if(j%k==0)
    {
        cout << "YES";
        return 0;
    }
    cout << "NO";
    return 0;
}

#include<bits/stdc++.h>
using namespace std;
int main(){
	string a;
	cin>>a;
	int b,c;
	for(int i=0;i<a.length();i++){
		if(a[i]=='o') b++;
		if(a[i]=='-') c++;
	}
	if(c%b==0) cout<<"YES"<<endl;
	else cout<<"NO"<<endl;
return 0;
}

#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <fstream>
#include <vector>
#include <algorithm>
#include <string>
#include <cmath>
#include <set>
#include <map>
#include <numeric>
#include <queue>
#include <iomanip>
#define ll long long
#define ios ios_base::sync_with_stdio(false); cin.tie(NULL);

using namespace std;

ifstream fin("input.txt");
ofstream fout("output2.txt");

int main() {
	ios;
	string s;
	cin >> s;

	int b = 0;
	int n = 0;

	for (int i = 0; i < s.size(); i++) {
		if (s[i] == 'o') b++;
		else n++;
	}

	if (b == 1 || n == 0) {
		cout << "YES";
		exit(0);
	}
	if (b % n == 0 || n % b == 0) {
		cout << "YES";
	}
	else {
		cout << "NO";
	}
}

#include <bits/stdc++.h>

#define pb push_back
#define mp make_pair
#define ff first
#define ss second
#define cn(x) scanf ("%i", &(x))

using namespace std;

int main (){
	int o = 0, l = 0;
	string st;
	cin >> st;
	for (int i = 0; i < st.length(); i++)
		if (st[i] == '-')
			l++;
		else
			o++;
	if (o == 0){cout << "YES"; return 0;}
	if (l == 0){cout << "YES"; return 0;}
	if (o >= l && o%l == 0){cout << "YES"; return 0;}
	if (l >= o && l%o == 0){cout << "YES"; return 0;}
	int a = st.length();
	if (a%2 == 0){cout << "YES"; return 0;}
	cout << "NO";
	return 0;
}

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

int main()
{string word;
int countl=0,counto=0;
cin>>word;

for(int i=0 ;i<word.length() ;i++)
{
    if(word[i]=='-')
        countl++;
    if(word[i]=='o')
        counto++;
}

if(countl==counto && countl>1 && counto>1)
    return cout<<"YES",0;
if(countl==counto && countl==1 && counto==1)
    return cout<<"NO",0;

if(countl==0 )
    return cout<<"YES",0;
if(counto==0 )
    return cout<<"YES",0;
if(counto==1 &&countl>1)
    return cout<<"YES",0;
if(counto==1&&countl==1 )
    return cout<<"NO",0;

if(countl%2==0 && counto%2==0 && countl%counto==0)
    return cout<<"YES",0;
if(countl%2==0 && counto%2==0 && countl%counto!=0)
    return cout<<"NO",0;

if(countl%2!=0 && counto%2 !=0  && countl%counto==0)
    return cout<<"YES",0;
if(countl%2!=0 && counto%2 !=0  && countl%counto!=0)
    return cout<<"NO",0;

if(counto%2 == 0 && countl%2!=0)
    return cout<<"NO",0;

if(countl%2==0 && counto%2!=0 && countl>counto)
    return cout<<"YES",0;

else
    return cout<<"NO",0;

}

#include <bits/stdc++.h>
using namespace std;
int main()
{
    string s;
    char n='-';
    char t='o';
    int i,ngang=0,tron=0;
    cin>>s;
    for(i=0;i<s.size();i++)
    {
        if((int)s[i]==(int) n)
            ngang++;
        else if((int)s[i]==(int) t)
            tron++;
    }
    if(ngang==0 || tron==0)
    {
        cout<<"YES";
        return 0;
    }
    if(ngang%tron==0 || tron%ngang==0)
        cout<<"YES";
    else
        cout<<"NO";
    return 0;
}

#include <bits/stdc++.h>

using namespace std;
    string s;
 int l=s.length();
int main()
{
   int a=0,b=0;
    cin>>s;
    for(int i=0;i<l;i++)
    {
     if(s[i]=='-')
       a++;
         if(s[i]=='o')
        b++;
    }
    if(b==1)

        cout<<"YES"<<endl;

else if(b==0)
    cout<<"YES"<<endl;
        else if(a==0)

      cout<<"YES"<<endl;

    else if(a%b==0)

        cout<<"YES"<<endl;

    else

        cout<<"NO"<<endl;
    return 0;
}

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

#define f(i,a,b) for(int i=(int)(a);i<=(int)(b);i++)
#define char_f(i,a) for(int i=(int)(a);(char)s[i]!='\0';i++)
#define rf(i,a,b) for(int i=(int)(a);i>=(int)(b);i--)
#define llf(i,a,b) for(long long int i=(long long int)(a);i<=(long long int)(b);i++)
#define llrf(i,a,b) for(long long int i=(long long int)(a);i>=(long long int)(b);i--)

#define ll long long
#define fi first
#define se second
#define pb push_back
#define pop pop_back
#define mem(ara) memset((ara),0,sizeof(ara))
#define memn(ara) memset((ara),-1,sizeof(ara))
#define b begin()
#define e end()
#define em emplace
#define eb emplace_back

#define si set<int>
#define sd set<double>
#define sll set<long long int>
#define ss set<string>
#define sc set<char>

#define pii pair<int,int>
#define pli pair<long long int,int>
#define pil pair<int,long long int>
#define pll pair<long long int,long long int>
#define pci pair<char,int>
#define pic pair<int,char>
#define pcl pair<char,long long int>
#define plc pair<long long int,char>

#define pss pair<string,string>
#define pcc pair<char,char>

#define pis pair<int,string>
#define psi pair<string,int>
#define pls pair<long long int,string>
#define psl pair<string,long long int>
#define pdd pair<double,double>
#define pcs pair<char,string>
#define psc pair<string,char>

#define vi  vector<int>
#define vll vector<long long int>
#define vd vector<double>
#define vs vector<string>
#define vc vector<char>
#define vii vector<pii>

#define mod 1000000007
#define mx (1<<30)-1
#define llmx (1ll<<62)
#define n_size 100005
#define g_size 10000005
double PI=acos(-1);

///unsigned int uMAX=4294967295;
///unsigned ll int ullMAX=18446744073709551615;

int arr[g_size];

int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(nullptr);
	cout.tie(nullptr);

	int n,m,T,res;

	int maxi=-mx,mini=mx,count=0,c=0;

	int i,j,k;

	bool flag;

	string s1,s2;

	char s[100000];

	int ara[n_size],ara2[n_size];

	cin>>s;

	f(i,0,strlen(s)-1){
        if(s[i]=='o') count++;
        else if(s[i]=='-') c++;
	}

    //cout<<c<<endl;
	if(count==1){
        cout<<"YES"<<endl;
	}
	else if(c==0){
        cout<<"YES"<<endl;
	}
	else if(count>1){
        (c%count==0) ? cout<<"YES"<<endl:cout<<"NO"<<endl;
	}

}

///In the name of Allah
///BY_Mohammed_ALmasry
#include <bits/stdc++.h>
using namespace std;
typedef  long long ll;
///double rad= ( ( Angle_in_degree  *pi ) * 1.0 ) / 180;
///tan(rad):only in radians
#define Fast ios_base::sync_with_stdio(false)
#define pi 3.14159265358979323846//pi=acos(-1)
#define read freopen("input.txt","r",stdin)
#define write freopen("output.txt","w",stdout)
#define fi first
#define se second
#define pb push_back
#define f0(i,n) for(int i=0;i<n;i++)
#define f1(i,n) for(int i=1;i<=n;i++)
#define ff(i,s,e) for(int i=s;i<=e;i++)
#define all(v) v.begin(),v.end()
#define mod 1000000007
#define sz size
//cout<<fixed<<setprecision(0);
int xx[4]={0,0,1,-1};
int yy[4]={1,-1,0,0};
bool sieve[1000000];
ll tot;
vector<int>v[110][110];
bool vi[110];
vector< ll > sp(10001,0);
int a[101][101];
int main()
{
Fast;
string s;
int cnt=0,cnt0=0;
cin>>s;
f0(i,s.sz())
{
if(s[i]=='-')
cnt++;
else
cnt0++;
}
if(cnt == 0 || cnt0==0 )
cout<<"YES";
else if(cnt0%cnt==0 || cnt%cnt0==0)
cout<<"YES";
else
cout<<"NO";
}

#include<bits/stdc++.h>
using namespace std;
int k=0,o=0;
int main() {
    char a;
    cin>>a;
    while(cin>>a){
    	if(a=='-')
    	k++;
    	if(a=='o')
    	o++;
		if(o==1||o==0)
		cout<<"YES";
		if(k%o==0)
		cout<<"YES";
	}
	if(k%o!=0){
	cout<<"NO";
	}
    return 0;
}

#include<cstdio>
#include<cstring>
#include<algorithm>
#include<iostream>
using namespace std;
int main()
{
    string str;
    cin>>str;
    int cnt0=0,cnt1=0;
    for(int i=0; str[i]!='\0'; ++i)
    {
        if(str[i] == '-')
            cnt1++;
        else
            cnt0++;
    }
    if(cnt1%2 ==0 && cnt0%2 ==0)
    {
        puts("YES");
    }
    else if(cnt0%cnt1==0 && cnt1!=0)
    {
        puts("YES");
    }
    else if(cnt1==0)
    {
        puts("YES");
    }
    else
        puts("NO");
    return 0;
}

// Links and Pearls
//#include "stdafx.h"
#include <iostream>
#include <string>
#include <cstring>
using namespace std;
int main()
{
	string  s;
	cin >> s;
	int l = s.length();
	char* arr = new char[l];
	strcpy(arr, s.c_str());
	int count = 0;
	int counto = 0;
	for (int i = 0; i < l; i++)
	{
		if (arr[i] == 'o')
		{
			counto++;
		}
		else
		{
			count++;
		}
	}
	if (((counto % 2) == 0 && count % 2 == 0) || (counto % 2 == 1 && count % 2 == 1) || counto == 1 || count == 1 || counto == 0 || count == 0)
	{
		cout << "YES" << endl;
		return 0;
	}
	else
	{
		cout << "NO" << endl;
	}
	return 0;
}

#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <fstream>
#include <vector>
#include <algorithm>
#include <string>
#include <cmath>
#include <set>
#include <map>
#include <numeric>
#include <queue>
#include <iomanip>
#define ll long long
#define ios ios_base::sync_with_stdio(false); cin.tie(NULL);

using namespace std;

ifstream fin("input.txt");
ofstream fout("output2.txt");

int main() {
	ios;
	string s;
	cin >> s;

	int b = 0;
	int n = 0;

	for (int i = 0; i < s.size(); i++) {
		if (s[i] == 'o') b++;
		else n++;
	}

	if (b == 1 || n == 0 ) {
		cout << "YES";
		exit(0);
	}

	if (n == 1 && b > 1 || (b == 0)) {
		cout << "NO";
		exit(0);
	}

	if (b % n == 0 || n % b == 0) {
		cout << "YES";
	}
	else {
		cout << "NO";
	}
}