Problem: A necklace can be described as a string of links ('-') and pearls ('o'), with the last link or pearl connected to the first one.

<image>

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.

Input

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

Output

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).

Examples

Input

<span class="tex-font-style-tt">-o-o--</span>

Output

YES

Input

<span class="tex-font-style-tt">-o---</span>


Output

YES

Input

<span class="tex-font-style-tt">-o---o-</span>


Output

NO

Input

ooo


Output

YES

Solution (in JAVA):

Solution:
 import java.io.*;
    import java.util.*;
  
 
  
        public class Codeforces {
    	
    		   public static long log2(long x)
    			{
    				long p=1;
    				long ans=0;
    				while(x>=p)
    				{
    					p*=2;
    					ans++;
    				}
    				return ans-1;
    			}
    		   
    		   
    		   public static void extendedgcd(int a, int b)
    		   {
    			   x=0;
    			   y=0;
    			   gc=0;
    			   xgcd(a,b);
    			   pw.println(a+"*"+x+" + "+b+"*"+y+" = "+gc);
    			   
    		   }
    		   
    		   
    		   public static long modex(long a, long b, long c)
    		   {
    			   if(b==0)
    				   return 1;
    			   else if(b==1)
    				   return a%c;
    			   else if(b%2==0)
    			   {
    				   	return modex((a*a)%c,b/2,c);
    			   }
    			   else
    			   {
    				   return (a*modex((a*a)%c,b/2,c))%c;
    				   
    			   }
    			   
    			   
    		   }
    		   
    		   
    		   public static void xgcd(int a, int b)
    		   {
    			   
    			   if(b==0)
    			   {
    				   x=1;
    				   y=0;
    				   gc=a;
    				   
    				   
    			   }
    			   else
    			   {
    				   xgcd(b,a%b);
    				   int temp = x;
    				   x=y;
    				   y = temp - ((a/b)*y);
    				   
    			   }
    		   }
    		   
    		   public static long gcd(long a, long b)
    		   {
    			   if(b==0)return a;
    			   else return gcd(b,a%b);
    			   
    		   }
    		   
    		   static int x,y,gc;
    		   
    		  
    		
    		   
    		   static HashSet<Character> set;
    		   
    		   
    		   
    		   public static long expmod(long a, long b, long mod)
    		   {
    			   if(b==0)return 1;
    			   if(b==1)return a;
    			   
    			   if(b%2==0)
    			   {
    				   return ((expmod(a,b/2,mod)%mod)*(expmod(a,b/2,mod)%mod))%mod;
    			   }
    			   else
    			   {
    				   return ((a%mod)*(expmod(a,b/2,mod)%mod)*(expmod(a,b/2,mod)%mod))%mod;
    			   }
    		   }
    		   
    		   static class Comp implements Comparator<Point>
    		   {

				@Override
				public int compare(Point arg0, Point arg1) {
					
					if(arg0.x>arg1.x)return 1;
					if(arg0.x<arg1.x)return -1;
					return 0;
				}
    			   
    		   }
    		   
    		   
    		   static class STComp implements Comparator<Integer>
    		   {

				@Override
				public int compare(Integer arg0, Integer arg1) {
					
					return arg0.compareTo(arg1); 
				}
    			   
    		   }
    		   
    		   static class Point
    		   {
    			   int x,y,ind;
    			   
    			    public Point(int a, int b)
    			    {
    			    	x=a;
    			    	y=b;
    			    	ind=0;
    			    }
    			   
    			    
    		   }
    		   
    		   
    		   public static int getsub(int node)
    		   {
    			   vis[node]=1;
    			   ArrayList<Integer> li = adj[node];
    			   
    			   int subtr=0;
    			   
    			   for(int ch:li)
    			   {
    				   if(vis[ch]==0)
    				   {
    					   int nodsubtree = getsub(ch);
    					   if(nodsubtree%2==0)ans++;
    					   subtr+=nodsubtree;
    				   }
    				   
    				   
    			   }
    			   
    			   
    			   return subtr+1;
    			   
    		   }
    		   
    		   static ArrayList<Integer>[] adj;
    		   static int[] vis;
    		   static int ans;
    		
    		   
    		   public static boolean issub(String s1, String s2)
    		   {
    			   if(s1.length()>s2.length())
    			   return false;
    			   
    			   int l1 = s1.length();
    			   int l2 = s2.length();
    			   
    			   
    			   for(int i=0;i<=l2-l1;i++)
    			   {
    				   String sub = s2.substring(i, i+l1);
    				   if(s1.equals(sub))return true;
    			   }
    			   
    			   return false;
    		   }
    		   
    		   
    		   public static void main(String[] args) 
    	   {
    			 
    			   int c1=0,c2=0;
    			   String st = sc.next();
    			   
    			   for(int i=0;i<st.length();i++)
    			   {
    				   char ch = st.charAt(i);
    				   
    				   if(ch=='o')
    				   {
    					   c1++;
    				   }
    				   else c2++;
    			   }
    			   
    			   if(c1==0)
    			   {
    				   	pw.println("YES");
    				   	pw.close();
    				   	return;
    			   }
    			   
    			   String ans = (c2%c1==0)?"YES":"NO";
    			   pw.println(ans);
    			   
    			   
    			   
    			   
    			
    		
    			
    			   //pw.println(pa);
    		/*	  NGE 
       		int[] sto = {100,80,60,70,60,75,85};
       		int n = sto.length;
       		
       		int[] spa = new int[n];
       		spa[0]=1;
       		
       		Stack<Integer> st = new Stack<Integer>();
       		st.push(0);
       		
       		for(int i=1;i<n;i++)
       		{
       			
       			while(!st.isEmpty()&&sto[st.peek()]<=sto[i])st.pop();
       			
       			spa[i]=(st.isEmpty())?i+1:i-st.peek();
       			st.push(i);
       			
       		}
    			  
       		
       		for(int i=0;i<n;i++)pw.print(sto[i]+" ");
    			   pw.println();
    			   for(int i=0;i<n;i++)pw.print(spa[i]+" ");
    			  
    			   
    			   int[] nge = new int[n];
    			   
    			   st.clear();
    			   Stack<Point> st2 = new Stack<Point>();
    			   st2.push(new Point(sto[0],0));
    			   
    			   for(int i=1;i<n;i++)
    			   {
    				   while(!st2.isEmpty()&&st2.peek().x<sto[i])
    				   {
    					   Point pop = st2.pop();
    					   nge[pop.y]=sto[i];
    				   }
    				   st2.push(new Point(sto[i],i));
    				   
    			   }
    			   
    			   while(!st2.isEmpty())
    			   {
    				   nge[st2.pop().y]=-1;
    			   }
    			  
    			   pw.println();
    			   for(int i=0;i<n;i++)pw.print(sto[i]+" ");
    			   pw.println();
    			   for(int i=0;i<n;i++)pw.print(nge[i]+" ");
    			 */ 
    			   
    			   /*  int r = 2000000000;
    			  pw.println(r);
    			int n = sc.nextInt();
    			int k = sc.nextInt();
    			int l = sc.nextInt();
    			int m = n*k;
    			int arr[] = new int[m];
    			
    			for(int i=0;i<m;i++)arr[i]=sc.nextInt();
    			
    			Arrays.sort(arr);
    			
    			int limit = l+arr[0];
    			int li=-1;
    			
    			for(int i=0;i<m;i++)
    			{
    				//pw.println(arr[i]);
    				if(arr[i]>limit)
    				{
    					//pw.println(arr[i]);
    					li=i; break;
    				}
    			}
    			//pw.println(limit+" "+li);
    			if(li==-1)li=n;
    			
    			int noofsmallest = li;
    			
    			if(noofsmallest<n)
    			{
    				pw.println(0);
    			}
    			else
    			{
    				li--;
    				long ans=0;
    				for(int i=0;i<n-1;i++)
    				{
    					ans+=(long)arr[li];
    					li--;
    				}
    				ans+=arr[0];
    				pw.println(ans);
    				
    			}
    			  */ 
    			   
    			   
    			   
    		
    			 
    			  
    			pw.close();  
    			   
    	   }
    		   
    		   
    		   
    		   static  class MyScanner 
    			{
    	
    			BufferedReader br;
    			StringTokenizer st;
    	
    			public MyScanner() 
    			{
    				br = new BufferedReader(new InputStreamReader(System.in));
    			}
    	
    			String next() 
    			{
    				
    				while (st == null || !st.hasMoreElements()) 
    				{
    					try 
    					{
    						st = new StringTokenizer(br.readLine());
    					} catch (IOException e) 
    					{
    						e.printStackTrace();
    					}
    				}
    				return st.nextToken();
    			}
    	
    			int nextInt() 
    			{
    				return Integer.parseInt(next());
    			}
    	
    			long nextLong() 
    			{
    				return Long.parseLong(next());
    			}
    	
    			double nextDouble() 
    			{
    				return Double.parseDouble(next());
    			}
    	
    			String nextLine()
    			{
    				String str = "";
    				try 
    				{
    					str = br.readLine();
    				} catch (IOException e) 
    				{
    					e.printStackTrace();
    				}
    				return str;
    			}
    	
    		}
    	
    		static MyScanner sc = new  MyScanner();
    		static PrintWriter pw = new PrintWriter(System.out, true);
    		
    	
    	
    		
    	}