#define boostit ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0)
#define ll long long int
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>

#include <ext/pb_ds/tree_policy.hpp>

using namespace __gnu_pbds;
using namespace std;

#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma GCC optimize("unroll-loops")

#define F first
#define S second
#define mp make_pair
#define pb push_back
#define vi vector<ll>
#define pii pair<ll,ll>
#define qi queue<ll>
#define mem(a,b) memset(a,b,sizeof(a))
#define ll long long int
#define print(a) cout<<a<<endl
#define sorted(a) sort(arr.begin(), arr.end())
#define gcd(a,b) __gcd((a),(b))
#define lcm(a,b) ((a)*(b))/gcd((a),(b))
#define read(a) scanf("%d", &a)
int main()
{
 boostit;
 ll t;
 //cin>>t;
 t=1;
  while(t--)
   {
    string s;
    cin>>s;
    ll count=0,len=s.length();
    for(ll i=0;i<s.length()-1;i++)
     {
       if(s[i]==s[i+1])
           {s.erase(i,2);i-=2;count++;}
     }
   // cout<<count<<endl;
    if(count%2==0)
       cout<<"No"<<endl;
    else
       cout<<"Yes"<<endl;
   }
  cerr << "\nTime elapsed: " << 1000 * clock() / CLOCKS_PER_SEC << "ms\n";
  return 0;
}


#include<iostream>
#include<bits/stdc++.h>
using namespace std;
int main()
{  string arr;int i,n,copy,c=0;
	cin>>arr;
  n=arr.length();
  n/=2;

     //	cout<<arr<<" ";
  	n--;//cout<<arr<<" ";

   for(i=0;i<arr.length();i++)
   {
   	if(arr[i]==arr[i+1])
   	{
   		arr.erase(i,2);

   		c++;

	   }
	   if(arr[i-1]==arr[i] && i>0)
	   {
	   	arr.erase(i-1,2);
	   	c++;
	   }
   }

   if(c%2==1)
   cout<<"YES";
   else
   cout<<"NO";

}


#include<iostream>
#include<bits/stdc++.h>
using namespace std;
int main()
{  string arr;int i,n,copy,c=0;
	cin>>arr;
  n=arr.length();
  while(n>0)
  {   //	cout<<arr<<" ";
  	n--;//cout<<arr<<" ";

   for(i=0;i<arr.length();i++)
   {
   	if(arr[i]==arr[i+1])
   	{
   		arr.erase(i,2);

   		c++;

	   }
   }
    }
    //cout<<arr;
   if(c%2==1)
   cout<<"YES";
   else
   cout<<"NO";

}


#include<iostream>
#include<bits/stdc++.h>
using namespace std;
int main()
{  string arr;int i,n,copy,c=0;
	cin>>arr;
  n=arr.length();
  n/=2;

     //	cout<<arr<<" ";
  	n--;//cout<<arr<<" ";

   for(i=0;i<arr.length();i++)
   {
   	if(arr[i]==arr[i+1])
   	{
   		arr.erase(i,2);

   		c++;

	   }
   }

    if(arr[0]==arr[1])
    c++;
    //cout<<arr;
   if(c%2==1)
   cout<<"YES";
   else
   cout<<"NO";

}


#include<iostream>
#include<bits/stdc++.h>
using namespace std;
int main()
{  string arr;int i,n,copy,c=0;
	cin>>arr;
  n=arr.length();
  while(n>0)
  {   //	cout<<arr<<" ";
  	n--;//cout<<arr<<" ";

   for(i=0;i<arr.length();i++)
   {
   	if(arr[i]==arr[i+1])
   	{  copy=i+1;
   		while(arr[i]==arr[copy])
   		copy++;
   		arr.erase(i,copy-i);

   		c++;

	   }
   }
    }
   if(c%2==1)
   cout<<"YES";
   else
   cout<<"NO";

}


#include<iostream>
#include<bits/stdc++.h>
using namespace std;
int main()
{  string arr;int i,n,copy,c=0;
	cin>>arr;
  n=arr.length();
  n/=2;
  while(n>0)
  {   //	cout<<arr<<" ";
  	n--;//cout<<arr<<" ";

   for(i=0;i<arr.length();i++)
   {
   	if(arr[i]==arr[i+1])
   	{
   		arr.erase(i,2);

   		c++;

	   }
   }
    }
    //cout<<arr;
   if(c%2==1)
   cout<<"YES";
   else
   cout<<"NO";

}


#include<iostream>
#include<bits/stdc++.h>
using namespace std;
int main()
{  string arr;int i,n,copy,c=0;
	cin>>arr;
  n=arr.length();
  n/=2;

     //	cout<<arr<<" ";
  	n--;//cout<<arr<<" ";

   for(i=0;i<arr.length();i++)
   {
   	if(arr[i]==arr[i+1])
   	{
   		arr.erase(i,2);

   		c++;
   		i=-1;

	   }
}

   if(c%2==1)
   cout<<"YES";
   else
   cout<<"NO";

}


#include<iostream>
#include<bits/stdc++.h>
using namespace std;
int main()
{  string arr;int i,n,copy,c=0;
	cin>>arr;
  n=arr.length();
  n/=2;

     //	cout<<arr<<" ";
  	n--;//cout<<arr<<" ";

   for(i=0;i<arr.length();i++)
   {
   	if(arr[i]==arr[i+1])
   	{
   		arr.erase(i,2);

   		c++;

	   }
	   if(arr[i-1]==arr[i])
	   {
	   	arr.erase(i-1,2);
	   	c++;
	   }
   }

   if(c%2==1)
   cout<<"YES";
   else
   cout<<"NO";

}


#include<iostream>
#include<iomanip>
#include<string.h>
using namespace std;
int main()
{
	char a[200001];
	gets(a);
	int sum=0;
	int len=strlen(a);
	int ch=0;
	while(ch<len-2*sum-1)
	{
		ch=0;
	    for(int i=0;i<len-2*sum;i++)
	    {
	    	if(a[i]==a[i+1])
		    {
			    for(int j=i;j+2<=len-2*sum;j++)
			    a[j]=a[j+2];
			    sum++;
			    ch=0;
			    break;
		    }
		    else ch++;
	    }
    }
	if(sum%2==0)
	cout<<"NO";
	if(sum%2==1)
	cout<<"YES";
}


#include<iostream>
#include<iomanip>
#include<string.h>
using namespace std;
int main()
{
	char a[100001];
	gets(a);
	int sum=0;
	int len=strlen(a);
	int ch=0;
	a[len+1]=3;
	while(ch<len-2*sum)
	{
		ch=0;
	    for(int i=0;i<len-2*sum;i++)
	    {
	    	if(a[i]==a[i+1])
		    {
			    for(int j=i;j+2<=len-2*sum;j++)
			    a[j]=a[j+2];
			    sum++;
			    ch=0;
			    break;
		    }
		    else ch++;
	    }
    }
	if(sum%2==0)
	cout<<"NO";
	if(sum%2==1)
	cout<<"YES";
}


#include<iostream>
#include<iomanip>
#include<string.h>
using namespace std;
int main()
{
	char a[100005];
	gets(a);
	int sum=0;
	int len=strlen(a);
	int ch=0;
	while(ch<len-2*sum)
	{
		ch=0;
	    for(int i=0;i<len-2*sum;i++)
	    {
	    	if(a[i]==a[i+1])
		    {
			    for(int j=i;j+2<=len-2*sum;j++)
			    a[j]=a[j+2];
			    sum++;
			    ch=0;
		    }
		    else ch++;
	    }
    }
	if(sum%2==0)
	cout<<"NO";
	if(sum%2==1)
	cout<<"YES";
}


#include<iostream>
#include<iomanip>
#include<string.h>
using namespace std;
int main()
{
	char a[100001];
	gets(a);
	int sum=0;
	int len=strlen(a);
	int ch=0;
	while(ch<len-2*sum)
	{
		ch=0;
	    for(int i=0;i<len-2*sum;i++)
	    {
	    	if(a[i]==a[i+1])
		    {
			    for(int j=i;j+2<len-2*sum;j++)
			    a[j]=a[j+2];
			    sum++;
			    ch=0;
		    }
		    else ch++;
	    }
    }
	if(sum%2==0)
	cout<<"NO";
	if(sum%2==1)
	cout<<"YES";
}


#include<iostream>
#include<iomanip>
#include<string.h>
using namespace std;
int main()
{
	char a[100001];
	gets(a);
	int sum=0;
	int len=strlen(a);
	int ch=0;
	a[len+1]=3;
	while(ch<len-2*sum)
	{
		ch=0;
	    for(int i=0;i<len-2*sum;i++)
	    {
	    	if(a[i]==a[i+1])
		    {
			    for(int j=i;j<len-2*sum;j++)
			    a[i]=a[i+2];
			    sum++;
			    ch=0;
			    break;
		    }
		    else ch++;
	    }
    }
	if(sum%2==0)
	cout<<"NO";
	if(sum%2==1)
	cout<<"YES";
}


#include<iostream>
#include<iomanip>
#include<string.h>
using namespace std;
int main()
{
	char a[100001];
	gets(a);
	int sum=0;
	int len=strlen(a);
	int ch=0;
	//a[len+1]='3';
	while(ch<len-2*sum-1)
	{
		ch=0;
	    for(int i=0;i<len-2*sum;i++)
	    {
	    	if(a[i]==a[i+1])
		    {
			    for(int j=i;j+2<=len-2*sum;j++)
			    a[j]=a[j+2];
			    sum++;
			    ch=0;
			    break;
		    }
		    else ch++;
	    }
    }
	if(sum%2==0)
	cout<<"NO";
	if(sum%2==1)
	cout<<"YES";
}


#include<iostream>
#include<iomanip>
#include<string.h>
using namespace std;
int main()
{
	char a[100005];
	gets(a);
	int sum=0;
	int len=strlen(a);
	int ch=0;
	while(ch<len-2*sum-1)
	{
		ch=0;
	    for(int i=0;i<len-2*sum-1;i++)
	    {
	    	if(a[i]==a[i+1])
		    {
			    for(int j=i;j+2<=len-2*sum;j++)
			    a[j]=a[j+2];
			    sum++;
			    ch=0;
		    }
		    else ch++;
	    }
    }
	if(sum%2==0)
	cout<<"NO";
	if(sum%2==1)
	cout<<"YES";
}


#include<iostream>
#include<iomanip>
#include<string.h>
using namespace std;
int main()
{
	char a[100005];
	gets(a);
	int sum=0;
	int len=strlen(a);
	int ch=0;
	while(ch<len-2*sum)
	{
		ch=0;
	    for(int i=0;i<len-2*sum-1;i++)
	    {
	    	if(a[i]==a[i+1])
		    {
			    for(int j=i;j+2<=len-2*sum;j++)
			    a[j]=a[j+2];
			    sum++;
			    ch=0;
		    }
		    else ch++;
	    }
    }
	if(sum%2==0)
	cout<<"NO";
	if(sum%2==1)
	cout<<"YES";
}


#include<iostream>
#include<iomanip>
#include<string.h>
using namespace std;
int main()
{
	char a[100005];
	gets(a);
	int sum=0;
	int len=strlen(a);
	int ch=0;
	while(ch<len-2*sum-1)
	{
		ch=0;
	    for(int i=0;i<len-2*sum;i++)
	    {
	    	if(a[i]==a[i+1])
		    {
			    for(int j=i;j+2<=len-2*sum;j++)
			    a[j]=a[j+2];
			    sum++;
			    ch=0;
		    }
		    else ch++;
	    }
    }
	if(sum%2==0)
	cout<<"NO";
	if(sum%2==1)
	cout<<"YES";
}


#include<iostream>
#include<iomanip>
#include<string.h>
using namespace std;
int main()
{
	char a[100001];
	gets(a);
	int sum=0;
	int len=strlen(a);
	int ch=0;
	while(ch!=len-2*sum)
	{
		ch=0;
	    for(int i=0;i<len-2*sum;i++)
	    {
	    	if(a[i]==a[i+1])
		    {
			    for(int j=i+2;j<len-2*sum;j++)
			    a[i]=a[j];
			    sum++;
			    break;
		    }
		else ch++;
	    }
    }
	if(sum%2==0)
	cout<<"NO";
	if(sum%2==1)
	cout<<"YES";
}


#include<iostream>
#include<iomanip>
#include<string.h>
using namespace std;
int main()
{
	char a[100001];
	gets(a);
	int sum=0;
	int len=strlen(a);
	int ch=0;
	while(ch<len-2*sum)
	{
		ch=0;
	    for(int i=0;i<len-2*sum;i++)
	    {
	    	if(a[i]==a[i+1])
		    {
			    for(int j=i;j+2<=len-2*sum;j++)
			    a[j]=a[j+2];
			    sum++;
			    ch=0;
		    }
		    else ch++;
	    }
    }
	if(sum%2==0)
	cout<<"NO";
	if(sum%2==1)
	cout<<"YES";
}


#include<iostream>
#include<iomanip>
#include<string.h>
using namespace std;
int main()
{
	char a[10000];
	gets(a);
	int sum=0;
	int len=strlen(a);
	int ch=0;
	while(ch!=len-2*sum)
	{
		ch=0;
	    for(int i=0;i<len-2*sum;i++)
	    {
	    	if(a[i]==a[i+1])
		    {
			    for(int j=i+2;j<len-2*sum;j++)
			    a[i]=a[j];
			    sum++;
			    break;
		    }
		else ch++;
	    }
    }
	if(sum%2==0)
	cout<<"NO";
	if(sum%2==1)
	cout<<"YES";
}


#include<iostream>
#include<iomanip>
#include<string.h>
using namespace std;
int main()
{
	char a[200001];
	gets(a);
	int sum=0;
	int len=strlen(a);
	int ch=0;
	while(ch<len-2*sum-1)
	{
		ch=0;
	    for(int i=0;i<len-2*sum;i++)
	    {
	    	if(a[i]==a[i+1])
		    {
			    for(int j=i;j+2<=len-2*sum;j++)
			    a[j]=a[j+2];
			    sum++;
			    ch=0;
		    }
		    else ch++;
	    }
    }
	if(sum%2==0)
	cout<<"NO";
	if(sum%2==1)
	cout<<"YES";
}


#include<iostream>
#include<iomanip>
#include<string.h>
using namespace std;
int main()
{
	char a[100001];
	gets(a);
	int sum=0;
	int len=strlen(a);
	int ch=0;
	a[len+1]=3;
	while(ch<len-2*sum)
	{
		ch=0;
	    for(int i=0;i<len-2*sum;i++)
	    {
	    	if(a[i]==a[i+1])
		    {
			    for(int j=i;j+2<=len-2*sum;j++)
			    a[j]=a[j+2];
			    sum++;
			    ch=0;
			    break;
		    }
		    else ch++;
	    }
    }
    cout<<sum;
	if(sum%2==0)
	cout<<"NO";
	if(sum%2==1)
	cout<<"YES";
}


#include<iostream>
#include<iomanip>
#include<string.h>
using namespace std;
int main()
{
	char a[110000];
	gets(a);
	int sum=0;
	int len=strlen(a);
	int ch=0;
	while(ch!=len-2*sum)
	{
		ch=0;
	    for(int i=0;i<len-2*sum;i++)
	    {
	    	if(a[i]==a[i+1])
		    {
			    for(int j=i+2;j<len-2*sum;j++)
			    a[i]=a[j];
			    sum++;
			    break;
		    }
		else ch++;
	    }
    }
	if(sum%2==0)
	cout<<"NO";
	if(sum%2==1)
	cout<<"YES";
}


#include<iostream>
#include<iomanip>
#include<string.h>
using namespace std;
int main()
{
	char a[100001];
	gets(a);
	int sum=0;
	int len=strlen(a);
	int ch=0;
	a[len+1]='3';
	while(ch<len-2*sum)
	{
		ch=0;
	    for(int i=0;i<len-2*sum;i++)
	    {
	    	if(a[i]==a[i+1])
		    {
			    for(int j=i;j+2<=len-2*sum;j++)
			    a[j]=a[j+2];
			    sum++;
			    ch=0;
			    break;
		    }
		    else ch++;
	    }
    }
	if(sum%2==0)
	cout<<"NO";
	if(sum%2==1)
	cout<<"YES";
}


#include<iostream>
#include<iomanip>
#include<string.h>
using namespace std;
int main()
{
	char a[100];
	gets(a);
	int sum=0;
	int len=strlen(a);
	int ch=0;
	while(ch!=len-2*sum)
	{
		ch=0;
	    for(int i=0;i<len-2*sum;i++)
	    {
	    	if(a[i]==a[i+1])
		    {
			    for(int j=i+2;j<len-2*sum;j++)
			    a[i]=a[j];
			    sum++;
			    break;
		    }
		else ch++;
	    }
    }
	if(sum%2==0)
	cout<<"NO";
	if(sum%2==1)
	cout<<"YES";
}


#include<iostream>
#include<iomanip>
#include<string.h>
using namespace std;
int main()
{
	char a[1000];
	gets(a);
	int sum=0;
	int len=strlen(a);
	int ch=0;
	while(ch!=len-2*sum)
	{
		ch=0;
	    for(int i=0;i<len-2*sum;i++)
	    {
	    	if(a[i]==a[i+1])
		    {
			    for(int j=i+2;j<len-2*sum;j++)
			    a[i]=a[j];
			    sum++;
			    break;
		    }
		else ch++;
	    }
    }
	if(sum%2==0)
	cout<<"NO";
	if(sum%2==1)
	cout<<"YES";
}


#include<iostream>
#include<iomanip>
#include<string.h>
using namespace std;
int main()
{
	char a[1000000];
	gets(a);
	int sum=0;
	int len=strlen(a);
	int ch=0;
	while(ch!=len-2*sum)
	{
		ch=0;
	    for(int i=0;i<len-2*sum;i++)
	    {
	    	if(a[i]==a[i+1])
		    {
			    for(int j=i+2;j<len-2*sum;j++)
			    a[i]=a[j];
			    sum++;
			    break;
		    }
		else ch++;
	    }
    }
	if(sum%2==0)
	cout<<"NO";
	if(sum%2==1)
	cout<<"YES";
}


#include<iostream>
#include<iomanip>
#include<string.h>
using namespace std;
int main()
{
	char a[100005];
	char b[100005];
	gets(a);
	int len=strlen(a);
	int h=0;
	int sum=0;
	for(int i=0;i<len;i++)
	{
		b[h]=a[i];
		if(b[h]==b[h-1])
		{
			h--;
			sum++;
		}
		else
		h++;
	}
	if(sum%2==1)
	cout<<"YES";
	if(sum%2==0)
	cout<<"NO";
}


#include<iostream>
#include<iomanip>
#include<string.h>
using namespace std;
int main()
{
	char a[100001];
	gets(a);
	int sum=0;
	int len=strlen(a);
	int ch=0;
	while(ch<len-2*sum)
	{
		ch=0;
	    for(int i=0;i<len-2*sum;i++)
	    {
	    	if(a[i]==a[i+1])
		    {
			    for(int j=i+2;j<len-2*sum;j++)
			    a[i]=a[j];
			    sum++;
			    break;
		    }
		else ch++;
	    }
    }
	if(sum%2==0)
	cout<<"NO";
	if(sum%2==1)
	cout<<"YES";
}


#include<iostream>
#include<iomanip>
#include<string.h>
using namespace std;
int main()
{
	char a[200001];
	gets(a);
	int sum=0;
	int len=strlen(a);
	int ch=0;
	while(ch<len-2*sum)
	{
		ch=0;
	    for(int i=0;i<len-2*sum;i++)
	    {
	    	if(a[i]==a[i+1])
		    {
			    for(int j=i;j+2<=len-2*sum;j++)
			    a[j]=a[j+2];
			    sum++;
			    ch=0;
		    }
		    else ch++;
	    }
    }
	if(sum%2==0)
	cout<<"NO";
	if(sum%2==1)
	cout<<"YES";
}


#include<iostream>
#include<iomanip>
#include<string.h>
using namespace std;
int main()
{
	char a[100001];
	gets(a);
	int sum=0;
	int len=strlen(a);
	int ch=0;
	a[len+1]=3;
	while(ch<len-2*sum)
	{
		ch=0;
	    for(int i=0;i<len-2*sum;i++)
	    {
	    	if(a[i]==a[i+1])
		    {
			    for(int j=i;j+2<len-2*sum;j++)
			    a[j]=a[j+2];
			    sum++;
			    ch=0;
			    break;
		    }
		    else ch++;
	    }
    }
	if(sum%2==0)
	cout<<"NO";
	if(sum%2==1)
	cout<<"YES";
}


#include<iostream>
#include<iomanip>
#include<string.h>
using namespace std;
int main()
{
	char a[100001];
	gets(a);
	int sum=0;
	int len=strlen(a);
	int ch=0;
	//a[len+1]='3';
	while(ch<len-2*sum)
	{
		ch=0;
	    for(int i=0;i<len-2*sum;i++)
	    {
	    	if(a[i]==a[i+1])
		    {
			    for(int j=i;j+2<=len-2*sum;j++)
			    a[j]=a[j+2];
			    sum++;
			    ch=0;
			    break;
		    }
		    else ch++;
	    }
    }
	if(sum%2==0)
	cout<<"NO";
	if(sum%2==1)
	cout<<"YES";
}


#include<iostream>
#include<iomanip>
#include<string.h>
using namespace std;
int main()
{
	char a[200001];
	gets(a);
	int sum=0;
	int len=strlen(a);
	int ch=0;
	a[len+1]=3;
	while(ch<len-2*sum)
	{
		ch=0;
	    for(int i=0;i<len-2*sum;i++)
	    {
	    	if(a[i]==a[i+1])
		    {
			    for(int j=i;j+2<=len-2*sum;j++)
			    a[j]=a[j+2];
			    sum++;
			    ch=0;
			    break;
		    }
		    else ch++;
	    }
    }
	if(sum%2==0)
	cout<<"NO";
	if(sum%2==1)
	cout<<"YES";
}


#include<iostream>
#include<iomanip>
#include<string.h>
using namespace std;
int main()
{
	char a[100000];
	gets(a);
	int sum=0;
	int len=strlen(a);
	int ch=0;
	while(ch!=len-2*sum)
	{
		ch=0;
	    for(int i=0;i<len-2*sum;i++)
	    {
	    	if(a[i]==a[i+1])
		    {
			    for(int j=i+2;j<len-2*sum;j++)
			    a[i]=a[j];
			    sum++;
			    break;
		    }
		else ch++;
	    }
    }
	if(sum%2==0)
	cout<<"NO";
	if(sum%2==1)
	cout<<"YES";
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
    vector<int>v;
    string s;
    cin>>s;
    int count=0;
    for(int i=0;i<s.length()-1;i++)
    {
        count++;
      string r=s.substr(i,2);
      if(r[0]==r[1])
      {
         // cout<<count<<endl;
          if(count%2==0)
          {
              cout<<"NO"<<endl;
          }
          else{
            cout<<"YES"<<endl;
            return 0;
          }
      }
    }
    cout<<"NO"<<endl;
    return 0;

}


#include<bits/stdc++.h>
using namespace std;
int main()
{
    string s;
    cin>>s;
    if(s.length()==1)
    {
        cout<<"No"<<endl;
    }
    for(int i=0;i<s.length()-1;i++)
    {
        if(s[i]==s[i+1]){
            cout<<"Yes"<<endl;
        return 0;}
        else{
            cout<<"No"<<endl;
            return 0;}
    }
    return 0;

}


#include<bits/stdc++.h>
using namespace std;
int main()
{
    vector<int>v;
    string s;
    cin>>s;
    for(int i=0;i<s.length()-1;i++)
    {
        if(s[i]==s[i+1])
        {
            v.push_back(i);
            i++;
        }
    }
    if(v.size()==0)
    {
        cout<<"NO"<<endl;
        return 0;
    }

   for(int i=0;i<v.size();i++)
   {
       if(v[i]%2==0)
       {
           cout<<"YES"<<endl;
           return 0;
       }
       else
       {
           cout<<"NO"<<endl;
           return 0;
       }
   }
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
    string s;
    cin>>s;
    stack<char>st;
    int count=0;
    for(int i=0;i<s.length();i++)
    {
        if(st.empty()==true)
        {
            st.push(s[i]);
        }
        else
        {
            if(st.top()==s[i])
            {
                st.pop();
                count++;            }
        else{
            st.push(s[i]);
        }
    }
    }
    //cout<<count<<endl;
    if(count==0)
    {
        cout<<"NO"<<endl;
        return 0;
    }
    if(count%2==0)
    {
        cout<<"NO"<<endl;
    }
    else{
        cout<<"YES"<<endl;
    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
    string s;
    cin>>s;
    for(int i=0;i<s.length()-1;i++)
    {
        if(s[i]==s[i+1]){
            cout<<"Yes"<<endl;
        return 0;}
        else{
            cout<<"No"<<endl;
            return 0;}
    }
    return 0;

}


#include<bits/stdc++.h>
using namespace std;
int main()
{
    vector<int>v;
    string s;
    cin>>s;
    for(int i=0;i<s.length()-1;i++)
    {
        if(s[i]==s[i+1])
        {
            v.push_back(i);
            i++;
        }
    }

   for(int i=0;i<v.size();i++)
   {
       if(v[i]%2==0)
       {
           cout<<"YES"<<endl;
           return 0;
       }
       else
       {
           cout<<"NO"<<endl;
           return 0;
       }
   }
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
    vector<int>v;
    string s;
    cin>>s;
    int count=0;
    for(int i=0;i<s.length()-1;i++)
    {
        count++;
      string r=s.substr(i,2);
      if(r[0]==r[1])
      {
         // cout<<count<<endl;
          if(count%2==0)
          {
              cout<<"NO"<<endl;
              return 0;
          }
          else{
            cout<<"YES"<<endl;
            return 0;
          }
      }
    }
    cout<<"NO"<<endl;
    return 0;

}


#include<bits/stdc++.h>
using namespace std;
int main()
{
    vector<int>v;
    string s;
    cin>>s;
    int count=0;
    for(int i=0;i<s.length()-1;i++)
    {
        count++;
      string r=s.substr(i,2);
      if(r[0]==r[1])
      {
         // cout<<count<<endl;
          if(count%2==0)
          {
              cout<<"NO"<<endl;
          }
          else{
            cout<<"YES"<<endl;
            return 0;
          }
      }
    }

}


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

#define fastio 			ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)
#define ff				first
#define ss 				second
#define int				long long
#define pb 				push_back
#define pf 				push_front
#define mp 				make_pair
#define pii 			pair<int,int>
#define vi 				vector<int>
#define set 			set<int>
#define mii 			map<int,int>
#define pqbig	 		priority_queue<int>
#define pqsmall 		priority_queue<int,vi,greater<int> >
#define sze 			200005
#define mod 			1000000007
#define inf 			2000000009
#define p(x,y) 			fixed<<setprecision(y)<<x
#define print(x) 		for(auto el : x) cout<<el<<' '; cout<<'\n';
#define mk(type,arr,n) 	type *arr=new type[n];
#define tc 				int tc; cin>>tc; while(tc--)

void startfunc()
{
	fastio;
    #ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
    #endif
}

int32_t main()
{
	startfunc();
	string s; cin>>s;
	int n =s.length();
	int total = 0;
	int nxt = 1;
	int i=0;
	while(i<n && nxt<n)
	{
		if(s[nxt]==s[i])
		{
			total++;
			s[nxt]=s[i]='-';
			if(i!=0)
				i-=1;
			else
				i=nxt++;
			nxt++;
		}
		else
		{
			i = nxt;
			nxt++;
		}
	}
	if((total%2)==0)
		cout<<"No\n";
	else
		cout<<"Yes\n";
	return 0;
}


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

#define fastio 			ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)
#define ff				first
#define ss 				second
#define int				long long
#define pb 				push_back
#define pf 				push_front
#define mp 				make_pair
#define pii 			pair<int,int>
#define vi 				vector<int>
#define set 			set<int>
#define mii 			map<int,int>
#define pqbig	 		priority_queue<int>
#define pqsmall 		priority_queue<int,vi,greater<int> >
#define sze 			200005
#define mod 			1000000007
#define inf 			2000000009
#define p(x,y) 			fixed<<setprecision(y)<<x
#define print(x) 		for(auto el : x) cout<<el<<' '; cout<<'\n';
#define mk(type,arr,n) 	type *arr=new type[n];
#define tc 				int tc; cin>>tc; while(tc--)

void startfunc()
{
	fastio;
    #ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
    #endif
}

int32_t main()
{
	startfunc();
	string s; cin>>s;
	int n =s.length();
	int total = 0;
	int nxt = 1;
	int i=0;
	while(i<n && nxt<n)
	{
		if(s[nxt]==s[i])
		{
			total++;
			s[nxt]=s[i]='-';
			if(i!=0)
				i-=1;
			else
				i=nxt;
			nxt++;
		}
		else
		{
			i = nxt;
			nxt++;
		}
	}
	if(total%2==0)
		cout<<"No\n";
	else
		cout<<"Yes\n";
	return 0;
}


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

#define fastio 			ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)
#define ff				first
#define ss 				second
#define int				long long
#define pb 				push_back
#define pf 				push_front
#define mp 				make_pair
#define pii 			pair<int,int>
#define vi 				vector<int>
#define set 			set<int>
#define mii 			map<int,int>
#define pqbig	 		priority_queue<int>
#define pqsmall 		priority_queue<int,vi,greater<int> >
#define sze 			200005
#define mod 			1000000007
#define inf 			2000000009
#define p(x,y) 			fixed<<setprecision(y)<<x
#define print(x) 		for(auto el : x) cout<<el<<' '; cout<<'\n';
#define mk(type,arr,n) 	type *arr=new type[n];
#define tc 				int tc; cin>>tc; while(tc--)

void startfunc()
{
	fastio;
    #ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
    #endif
}

int32_t main()
{
	startfunc();
	string s; cin>>s;
	stack<int> st;
	int total=0;
	for(auto ch : s)
	{
		if(!st.empty() && st.top()==ch)
		{
			total++;
			st.pop();
		}
		else
			st.push(ch);
	}
	if(total&1)
	{
		cout<<"Yes\n";
	}
	else
		cout<<"No\n";
	return 0;
}


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

#define fastio 			ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)
#define ff				first
#define ss 				second
#define int				long long
#define pb 				push_back
#define pf 				push_front
#define mp 				make_pair
#define pii 			pair<int,int>
#define vi 				vector<int>
#define set 			set<int>
#define mii 			map<int,int>
#define pqbig	 		priority_queue<int>
#define pqsmall 		priority_queue<int,vi,greater<int> >
#define sze 			200005
#define mod 			1000000007
#define inf 			2000000009
#define p(x,y) 			fixed<<setprecision(y)<<x
#define print(x) 		for(auto el : x) cout<<el<<' '; cout<<'\n';
#define mk(type,arr,n) 	type *arr=new type[n];
#define tc 				int tc; cin>>tc; while(tc--)

void startfunc()
{
	fastio;
    #ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
    #endif
}

int32_t main()
{
	startfunc();
	string s; cin>>s;
	int n =s.length();
	int total = 0;
	int nxt = 1;
	int i=0;
	while(i<n && nxt<n)
	{
		if(s[nxt]==s[i])
		{
			total++;
			s[nxt]=s[i]='-';
			if(i!=0)
				i-=1;
			else
				i=++nxt;
			nxt++;
		}
		else
		{
			i = nxt;
			nxt++;
		}
	}
	if((total%2)==0)
		cout<<"No\n";
	else
		cout<<"Yes\n";
	return 0;
}


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

#define fastio 			ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)
#define ff				first
#define ss 				second
#define int				long long
#define pb 				push_back
#define pf 				push_front
#define mp 				make_pair
#define pii 			pair<int,int>
#define vi 				vector<int>
#define set 			set<int>
#define mii 			map<int,int>
#define pqbig	 		priority_queue<int>
#define pqsmall 		priority_queue<int,vi,greater<int> >
#define sze 			200005
#define mod 			1000000007
#define inf 			2000000009
#define p(x,y) 			fixed<<setprecision(y)<<x
#define print(x) 		for(auto el : x) cout<<el<<' '; cout<<'\n';
#define mk(type,arr,n) 	type *arr=new type[n];
#define tc 				int tc; cin>>tc; while(tc--)

void startfunc()
{
	fastio;
    #ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
    #endif
}

int32_t main()
{
	startfunc();
	string s; cin>>s;
	int n =s.length();
	int total = 0;
	int nxt = 1;
	for(int i=0;i<n;++i)
	{
		if(i>=0 && nxt<n && s[nxt]==s[i])
		{
			total++;
			s[i]=s[nxt]='-';
			nxt++;
			i-=2;
		}
		else if(i>=0)
		{
			nxt++;
		}
	}
	if(total%2==0)
		cout<<"No\n";
	else
		cout<<"Yes\n";
	return 0;
}


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

#define fastio 			ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)
#define ff				first
#define ss 				second
#define int				long long
#define pb 				push_back
#define pf 				push_front
#define mp 				make_pair
#define pii 			pair<int,int>
#define vi 				vector<int>
#define set 			set<int>
#define mii 			map<int,int>
#define pqbig	 		priority_queue<int>
#define pqsmall 		priority_queue<int,vi,greater<int> >
#define sze 			200005
#define mod 			1000000007
#define inf 			2000000009
#define p(x,y) 			fixed<<setprecision(y)<<x
#define print(x) 		for(auto el : x) cout<<el<<' '; cout<<'\n';
#define mk(type,arr,n) 	type *arr=new type[n];
#define tc 				int tc; cin>>tc; while(tc--)

void startfunc()
{
	fastio;
    #ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
    #endif
}

int32_t main()
{
	startfunc();
	string s; cin>>s;
	int n =s.length();
	int total = 0;
	int nxt = 1;
	for(int i=0;i<n;++i)
	{
		if(i>=0 && nxt<n && s[nxt]==s[i])
		{
			total++;
			s[i]=s[nxt]='-';
			nxt++;
			i-=2;
		}
		else
		{
			nxt++;
		}
	}
	if(total%2==0)
		cout<<"No\n";
	else
		cout<<"Yes\n";
	return 0;
}


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

#define fastio 			ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)
#define ff				first
#define ss 				second
#define int				long long
#define pb 				push_back
#define pf 				push_front
#define mp 				make_pair
#define pii 			pair<int,int>
#define vi 				vector<int>
#define set 			set<int>
#define mii 			map<int,int>
#define pqbig	 		priority_queue<int>
#define pqsmall 		priority_queue<int,vi,greater<int> >
#define sze 			200005
#define mod 			1000000007
#define inf 			2000000009
#define p(x,y) 			fixed<<setprecision(y)<<x
#define print(x) 		for(auto el : x) cout<<el<<' '; cout<<'\n';
#define mk(type,arr,n) 	type *arr=new type[n];
#define tc 				int tc; cin>>tc; while(tc--)

void startfunc()
{
	fastio;
    #ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
    #endif
}

int32_t main()
{
	startfunc();
	string s; cin>>s;
	int n =s.length();
	int total = 0;
	int nxt = 1;
	int i=0;
	while(i<n && nxt<n)
	{
		if(s[nxt]==s[i])
		{
			total++;
			//s[nxt]=s[i]='-';
			if(i!=0)
				i-=1;
			else
				i=nxt++;
			nxt++;
		}
		else
		{
			i = nxt;
			nxt++;
		}
	}
	if((total%2)==0)
		cout<<"No\n";
	else
		cout<<"Yes\n";
	return 0;
}


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

#define fastio 			ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)
#define ff				first
#define ss 				second
#define int				long long
#define pb 				push_back
#define pf 				push_front
#define mp 				make_pair
#define pii 			pair<int,int>
#define vi 				vector<int>
#define set 			set<int>
#define mii 			map<int,int>
#define pqbig	 		priority_queue<int>
#define pqsmall 		priority_queue<int,vi,greater<int> >
#define sze 			200005
#define mod 			1000000007
#define inf 			2000000009
#define p(x,y) 			fixed<<setprecision(y)<<x
#define print(x) 		for(auto el : x) cout<<el<<' '; cout<<'\n';
#define mk(type,arr,n) 	type *arr=new type[n];
#define tc 				int tc; cin>>tc; while(tc--)

void startfunc()
{
	fastio;
    #ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
    #endif
}

int32_t main()
{
	startfunc();
	string s; cin>>s;
	int n =s.length();
	int total = 0;
	int nxt = 1;
	int i=0;
	while(i<n)
	{
		if(nxt<n && s[nxt]==s[i])
		{
			total++;
			if(i!=0)
				i-=1;
			nxt++;
		}
		else
		{
			i = nxt;
			nxt++;
		}
	}
	if(total%2==0)
		cout<<"No\n";
	else
		cout<<"Yes\n";
	return 0;
}


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

int main()
{
    string test[]= {"aa","bb","cc","dd","ee","ff","gg","hh","ii","jj","kk","ll","mm","nn","oo","pp","qq","rr","ss","tt","uu","vv","ww","xx","yy","zz"};

    string s,s2;
    cin>>s;
    int x=0;
    bool bb=1;
    while(bb)
    {
        //cout<<s<<endl;
        bool bbb=0;
        for(int i=0; i<26; i++)
        {
            int x=s.find(test[i]);
            if(s.find(test[i])!=string::npos)
            {
                if(s.length()==2)
                {
                    bbb=1;
                    bb=0;
                    break;
                }
                string m=s.substr(0,x);
                s2+=m;
                if(x+2<s.length())
                    {
                        m=s.substr(x+2,s.length()-x-2);
                        s2+=m;
                    }
                s=s2;
                bbb=1;
                break;
            }

        }
        if(bbb)
            x++;
        else
            break;
    }
    if(x%2!=0)
        cout<<"Yes";
    else
        cout<<"No";

}


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

int main()
{
    string test[]= {"aa","bb","cc","dd","ee","ff","gg","hh","ii","jj","kk","ll","mm","nn","oo","pp","qq","rr","ss","tt","uu","vv","ww","xx","yy","zz"};

    string s,s2,m;
    cin>>s;
    int x=0;
    bool bb=1;
    bool bbb=0;
    int y;
    while(bb)
    {
        //cout<<s<<endl;
       bbb=0;
        for(int i=0; i<26; i++)
        {
            int y=s.find(test[i]);
            if(s.find(test[i])!=string::npos)
            {
                if(s.length()==2)
                {
                    bbb=1;
                    bb=0;
                    break;
                }
                m=s.substr(0,y);
                s2+=m;
                if(y+2<s.length())
                    {
                        m=s.substr(y+2,s.length()-y-2);
                        s2+=m;
                    }
                s=s2;
                s2="";
                bbb=1;
                break;
            }

        }
        if(bbb)
            x++;
        else
            break;
    }
    if(x%2!=0)
        cout<<"Yes";
    else
        cout<<"No";

}


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

int main()
{
    string test[]={"aa","bb","cc","dd","ee","ff","gg","hh","ii","jj","kk","ll","mm","nn","oo","pp","qq","rr","ss","tt","uu","vv","ww","xx","yy","zz"};

    string s,s2;
    cin>>s;
    int x=0;
    bool bb=1;
    while(bb)
    {//cout<<s<<endl;
        bool bbb=0;
        for(int i=0;i<26;i++)
        {
            int x=s.find(test[i]);
                if(s.find(test[i])!=string::npos)
            {
                if(s.length()==2){bbb=1;bb=0;break;}
                string m=s.substr(0,x);
                s2+=m;
                if(x+2<s.length())
                m=s.substr(x+2,s.length()-x-2);
                s2+=m;
                s=s2;
                bbb=1;
                break;
            }

        }
        if(bbb)x++;
        else break;
    }
    if(x%2!=0)cout<<"Yes";
    else cout<<"No";

}


#include <bits/stdc++.h>
#define ll long long int
using namespace std;
bool b[100100];
int  ok(string &s)
{
    int ans=0;
    for(int i=0;i<s.length()-1;i++)
        if(s[i]==s[i+1])
    {
        s[i]='#';
        s[i+1]='#';
        i++;
        ans++;
    }
    string s2;
    for(int i=0;i<s.length();i++)
    {
        if(s[i]!='#')s2+=s[i];

    }
    s=s2;
    return ans;
}
int ok2(string s)
{
    int l=-1,r=s.length();
    int k=0,k2=0;
    int ans=0;

    for(int i=0;i<s.length()-1;i++)
    {
        if(s[i]==s[i+1])
        { ans++;
            k=i-1;
            k2=i+2;
            while(k>l&&k2<r)
            {
                if(s[k]==s[k2])
                {
                    ans++;
                    k--;
                    k2++;
                }
            }
            if(s[k]==s[k2])l=k2;
            else s=k2-1;
        }
    }
    return ans;
}
int main()
{
    string s;
    cin>>s;
    int ans=ok(s);
    //cout<<s<<endl<<ans<<endl;
    int m=ok2(s);
    ans=ans+m;
   // cout<<ans<<endl;
if(ans%2!=0)cout<<"Yes";
else cout<<"No";

}


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

int main()
{
    string test[]= {"aa","bb","cc","dd","ee","ff","gg","hh","ii","jj","kk","ll","mm","nn","oo","pp","qq","rr","ss","tt","uu","vv","ww","xx","yy","zz"};

    string s,s2,m;
    cin>>s;
    int x=0;
    bool bb=1;
    bool bbb=0;
    int y;
    while(bb)
    {
        //cout<<s<<endl;
       bbb=0;
        for(int i=0; i<26; i++)
        {
            int y=s.find(test[i]);
            if(s.find(test[i])!=string::npos)
            {
                if(s.length()==2)
                {
                    bbb=1;
                    bb=0;
                    break;
                }
                m=s.substr(0,y);
                s2+=m;
                if(y+2<s.length())
                    {
                        m=s.substr(y+2,s.length()-y-2);
                        s2+=m;
                    }
                s=s2;
                bbb=1;
                break;
            }

        }
        if(bbb)
            x++;
        else
            break;
    }
    if(x%2!=0)
        cout<<"Yes";
    else
        cout<<"No";

}


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

string test[]={"aa","bb","cc","dd","ee","ff","gg","hh","ii","jj","kk","ll","mm","nn","oo","pp","qq","rr","ss","tt","uu","vv","ww","xx","yy","zz"};

int main()
{
    string s,s2;
    cin>>s;
    int x=0;
    bool bb=1;
    while(bb)
    {//cout<<s<<endl;
        bool bbb=0;
        for(int i=0;i<26;i++)
        {
            int x=s.find(test[i]);
                if(s.find(test[i])!=string::npos)
            {
                if(s.length()==2){bbb=1;bb=0;break;}
                string m=s.substr(0,x);
                s2+=m;
                if(x+2<s.length())
                m=s.substr(x+2,s.length()-x-2);
                s2+=m;
                s=s2;
                bbb=1;
                break;
            }

        }
        if(bbb)x++;
        else break;
    }
    if(x%2!=0)cout<<"Yes";
    else cout<<"No";

}


#include <bits/stdc++.h>
#define ll long long int
using namespace std;
vector<char>v;
int main()
{
   string s;
   cin>>s;
   int ans=0;
   v.push_back(s[0]);
   for(int i=1;i<s.length();i++)
   {
       if(s[i]==v.back())
       {
           ans++;//cout<<"oh";
           v.pop_back();

       }
       else v.push_back(s[i]);

   }//cout<<ans<<endl;
   if(ans%2==0)cout<<"NO";
       else cout<<"YES";
}


#include <bits/stdc++.h>
#define ll long long int
using namespace std;
int main()
{
   string s;
   cin>>s;
   int ans=0;
   for(int i=0;i<s.length()-1;i++)
   {
       if(s[i]==s[i+1]&&s[i]!='*')
       {
           ans++;//cout<<"oh";
           s[i]='*';
           s[i+1]='*';
           int l=i-1;
           int r=i+2;
           while(true){
           while(s[l]=='*'&&l>0){
            l--;
           }
           while(s[r]=='*'&&r<s.length()-1)
            r++;
           if(l>=0&&r<=s.length()-1&&s[l]!='*'&&s[r]!='*')
           {
               if(s[l]==s[r])
                {ans++;//cout<<"ok";
                s[l]='*';
                s[r]='*';
                }
           }
           else break;
           l--;
           r++;
           }

       }

   }//cout<<ans<<endl;
   if(ans%2==0)cout<<"NO";
       else cout<<"YES";
}


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

int vis[1000000];

int main () {

string s;

cin >> s;

int k = 0;
bool q1 = 1;
bool q2 = 1;
for (int i=0;i<s.length()-1;i++){
	if (s[i] == s[i+1] && vis[i] == 0 && vis[i+1] == 0){
		k++;
		vis[i] = 1;
		vis[i+1] = 1;
		int ind1 = i-1;
		int ind2 = i+2;
		bool l = 1;
		while (l && ind1 >= 0 && ind2 < s.length()) {
			while (vis[ind1] == 1 && q1 == 1){
				ind1--;
				if (ind1 == -1){
					q1 = 0;
				}
			}
			while (vis[ind2] == 1 && q2 == 1){
				ind2++;
				if (ind2 == s.length()){
					q2 = 0;
				}
			}
			if (s[ind1] == s[ind2] &&  ind1 >= 0 && ind2 < s.length() && vis[ind1] == 0 && vis[ind2] == 0){
				k++;
				vis[ind1] = 1;
				vis[ind2] = 1;
				ind1--;
				ind2++;
				i = max(i,ind2-2);
			}
			else {
				l = 0;
			}
		}
	}
}

if (k%2 == 0){
	cout << "No" << endl;
}
else {
	cout << "Yes" << endl;
}
return 0;
}


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

int vis[1000000];

int main () {

string s;

cin >> s;

int k = 0;
for (int i=0;i<s.length()-1;i++){
	if (s[i] == s[i+1]){
		k++;
		int ind1 = i-1;
		int ind2 = i+2;
		vis[i] = 1;
		vis[i+1] = 1;
		while (s[ind1]==s[ind2] && vis[ind1] == 0 && vis[ind2] == 0 && ind1 >= 0 && ind2 <s.length()) {
			k++;
			vis[ind1] = 1;
			vis[ind2] = 1;
			ind1--;
			ind2++;
		}
	}
}

if (k%2 == 0){
	cout << "No" << endl;
}
else {
	cout << "Yes" << endl;
}
return 0;
}


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

int vis[1000000];

int main () {

string s;

cin >> s;

int k = 0;
for (int i=0;i<s.length()-1;i++){
	if (s[i] == s[i+1] && vis[i] == 0 && vis[i+1] == 0){
		k++;
		vis[i] = 1;
		vis[i+1] = 1;
		int ind1 = i-1;
		int ind2 = i+2;
		bool l = 1;
		//cout << i << " " << i+1 << endl;
		while (l && ind1 >= 0 && ind2 < s.length()) {

			while (vis[ind1] == 1 && ind1>=0){
				ind1--;
				cout << ind1 << " " << ind2 << endl;
			}
			while (vis[ind2] == 1 &&ind2 < s.length()){
				ind2++;
				cout << ind1 << " " << ind2 << endl;
			}
			//cout << ind1 << " " << ind2 << endl;
			if (s[ind1] == s[ind2]){
				k++;
				vis[ind1] = 1;
				vis[ind2] = 1;
				ind1--;
				ind2++;
			}
			else {
				l = 0;
			}
		}
	}
}

if (k%2 == 0){
	cout << "No" << endl;
}
else {
	cout << "Yes" << endl;
}
return 0;
}


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

int vis[1000000];

int main () {

string s;

cin >> s;

for (int i=0;i<s.length();i++){
	vis[(int)s[i]]++;
}

int k = 0;
for (int i='a';i<='z';i++){
	k+=vis[i]/2;
}

bool l = 0;
for (int i=0;i<s.length()-1;i++){
	if (s[i] == s[i+1]){
		l = 1;
	}
}

if (l == 0){
	k = 0;
}
if (k%2==0){
	cout <<"No" << endl;
}
else {
	cout << "Yes" << endl;
}
return 0;
}


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

int vis[1000000];

int main () {

string s;

cin >> s;

int k = 0;
for (int i=0;i<s.length()-1;i++){
	if (s[i] == s[i+1] && vis[i] == 0 && vis[i+1] == 0){
		k++;
		vis[i] = 1;
		vis[i+1] = 1;
		int ind1 = i-1;
		int ind2 = i+2;
		bool l = 1;
		//cout << i << " " << i+1 << endl;
		while (l && ind1 >= 0 && ind2 < s.length()) {
			while (vis[ind1] == 1 && ind1>=0){
				ind1--;
				//cout << ind1 << " " << ind2 << endl;
			}
			while (vis[ind2] == 1 &&ind2 < s.length()){
				ind2++;
				//cout << ind1 << " " << ind2 << endl;
			}
			//cout << ind1 << " " << ind2 << endl;
			if (s[ind1] == s[ind2]){
				k++;
				vis[ind1] = 1;
				vis[ind2] = 1;
				ind1--;
				ind2++;
			}
			else {
				l = 0;
			}
		}
	}
}

if (k%2 == 0){
	cout << "No" << endl;
}
else {
	cout << "Yes" << endl;
}
return 0;
}


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

int vis[1000000];

int main () {

string s;

cin >> s;

int k = 0;
bool q1 = 1;
bool q2 = 1;
for (int i=0;i<s.length()-1;i++){
	if (s[i] == s[i+1] && vis[i] == 0 && vis[i+1] == 0){
		k++;
		vis[i] = 1;
		vis[i+1] = 1;
		int ind1 = i-1;
		int ind2 = i+2;
		bool l = 1;
		while (l && ind1 >= 0 && ind2 < s.length()) {
			while (vis[ind1] == 1 && ind1>=0 && q1 == 1){
				ind1--;
				if (ind1 == -1){
					q1 = 0;
				}
			}
			while (vis[ind2] == 1 && ind2 < s.length() && q2 == 1){
				ind2++;
				if (ind2 == s.length()){
					q2 = 0;
				}
			}
			if (s[ind1] == s[ind2]){
				k++;
				vis[ind1] = 1;
				vis[ind2] = 1;
				ind1--;
				ind2++;
			}
			else {
				l = 0;
			}
		}
	}
}

if (k%2 == 0){
	cout << "No" << endl;
}
else {
	cout << "Yes" << endl;
}
return 0;
}


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

int vis[1000000];

int main () {

string s;

cin >> s;

int k = 0;
bool q1 = 1;
bool q2 = 1;
for (int i=0;i<s.length()-1;i++){
	if (s[i] == s[i+1] && vis[i] == 0 && vis[i+1] == 0){
		k++;
		vis[i] = 1;
		vis[i+1] = 1;
		int ind1 = i-1;
		int ind2 = i+2;
		bool l = 1;
		while (l && ind1 >= 0 && ind2 < s.length()) {
			while (vis[ind1] == 1 && q1 == 1){
				ind1--;
			}
			while (vis[ind2] == 1 && q2 == 1){
				ind2++;
			}
			if (s[ind1] == s[ind2] &&  ind1 >= 0 && ind2 < s.length() && vis[ind1] == 0 && vis[ind2] == 0){
				k++;
				vis[ind1] = 1;
				vis[ind2] = 1;
				ind1--;
				ind2++;
			}
			else {
				l = 0;
			}
	}
}
}

if (k%2 == 0){
	cout << "No" << endl;
}
else {
	cout << "Yes" << endl;
}
return 0;
}


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

int vis[1000000];

int main () {

string s;

cin >> s;

int k = 0;
for (int i=0;i<s.length()-1;i++){
	if (s[i] == s[i+1] && vis[i] == 0 && vis[i+1] == 0){
		k++;
		int ind1 = i-1;
		int ind2 = i+2;
		while (s[ind1]==s[ind2] && vis[ind1] == 0 && vis[ind2] == 0 && ind1 >= 0 && ind2 <s.length()) {
			k++;
			vis[ind1] = 1;
			vis[ind2] = 1;
			ind1--;
			ind2++;
		}
	}
}

if (k%2 == 0){
	cout << "No" << endl;
}
else {
	cout << "Yes" << endl;
}
return 0;
}


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

int vis[1000000];

int main () {

string s;

cin >> s;

int k = 0;
bool q1 = 1;
bool q2 = 1;
for (int i=0;i<s.length()-1;i++){
	if (s[i] == s[i+1] && vis[i] == 0 && vis[i+1] == 0){
		k++;
		vis[i] = 1;
		vis[i+1] = 1;
		int ind1 = i-1;
		int ind2 = i+2;
		bool l = 1;
		while (l && ind1 >= 0 && ind2 < s.length()) {
			while (vis[ind1] == 1 && q1 == 1){
				ind1--;
				if (ind1 == -1){
					q1 = 0;
				}
			}
			while (vis[ind2] == 1 && q2 == 1){
				ind2++;
				if (ind2 == s.length()){
					q2 = 0;
				}
			}
			if (s[ind1] == s[ind2] &&  ind1 >= 0 && ind2 < s.length() && vis[ind1] == 0 && vis[ind2] == 0){
				k++;
				vis[ind1] = 1;
				vis[ind2] = 1;
				ind1--;
				ind2++;
			}
			else {
				l = 0;
			}
		}
	}
}

if (k%2 == 0){
	cout << "No" << endl;
}
else {
	cout << "Yes" << endl;
}
return 0;
}


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

int vis[1000000];

int main () {

string s;

cin >> s;

int k = 0;
bool q1 = 1;
bool q2 = 1;
for (int i=0;i<s.length()-1;i++){
	if (s[i] == s[i+1] && vis[i] == 0 && vis[i+1] == 0){
		k++;
		vis[i] = 1;
		vis[i+1] = 1;
		int ind1 = i-1;
		int ind2 = i+2;
		bool l = 1;
		while (l && ind1 >= 0 && ind2 < s.length()) {
			while (vis[ind1] == 1 && q1 == 1){
				ind1--;
				if (ind1 == -1){
					q1 = 0;
				}
			}
			while (vis[ind2] == 1 && q2 == 1){
				ind2++;
				if (ind2 == s.length()){
					q2 = 0;
				}
			}
			if (s[ind1] == s[ind2]){
				k++;
				vis[ind1] = 1;
				vis[ind2] = 1;
				ind1--;
				ind2++;
			}
			else {
				l = 0;
			}
		}
	}
}

if (k%2 == 0){
	cout << "No" << endl;
}
else {
	cout << "Yes" << endl;
}
return 0;
}


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

int vis[1000000];

int main () {

string s;

cin >> s;

int k = 0;
for (int i=0;i<s.length()-1;i++){
	if (s[i] == s[i+1] && vis[i] == 0 && vis[i+1] == 0){
		k++;
		int ind1 = i-1;
		int ind2 = i+2;
		vis[i] = 1;
		vis[i+1] = 1;
		while (s[ind1]==s[ind2] && vis[ind1] == 0 && vis[ind2] == 0 && ind1 >= 0 && ind2 <s.length()) {
			k++;
			vis[ind1] = 1;
			vis[ind2] = 1;
			ind1--;
			ind2++;
		}
	}
}

if (k%2 == 0){
	cout << "No" << endl;
}
else {
	cout << "Yes" << endl;
}
return 0;
}


#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef long double ld;
typedef pair<int, int> pi;
typedef pair<ll,ll> pll;
typedef pair<ld,ld> pld;

#define mp make_pair
#define pb push_back
#define f first
#define s second
#define lb lower_bound
#define ub upper_bound
#define INPUTL(i,n) for(ll i=0 ; i<n ; i++)
const int MOD = 998244353 ; // 1000000007 , 1000000009 , 1000000023
const ll INF = (1e18);
const ld PI = 4*atan((ld)1);

void array_debug(vector<ll>ar){
	for(auto x: ar)cout << x << ' ';
	cout << '\n';
}

ll ncr[2001][2001]={0};

void generate_nCr(){
	ncr[0][0]=1;
	ncr[1][1]=1 , ncr[1][0]=1;
	for(ll i=2 ; i<=2000 ; i++){
		for(ll j=0 ; j<=i ; j++){
			if(j==0)ncr[i][j] = 1;
			else ncr[i][j] = ((ncr[i-1][j])%MOD + (ncr[i-1][j-1])%MOD)%MOD;
		}
	}
}

ll power(ll x,ll n,ll mod)
{
    ll result=1;
    while(n>0){
        if(n&1)result = (result * x)%mod;
        x=(x*x)%mod;
        n >>= 1;
    }
    return result;
}

int main() {
	#ifdef AVI
		freopen("input.txt" , "r" , stdin);
	#endif
	ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.precision(20);
    string s;
    cin >> s;
    ll c=0;
    for(ll i=1 ; i<s.length() ; i++){
      if(s[i]==s[i-1]){
        c++;
        ll j=i-2 , k=i+1;
        ll x=0;
        while( j>=0 && k<s.length() && s[j]==s[k]){
          c++;j--;k++;x++;
        }
        i+=x+1;
      }
    }
    if(c%2==0)cout << "No";
    else cout << "Yes";
}


#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef long double ld;
typedef pair<int, int> pi;
typedef pair<ll,ll> pll;
typedef pair<ld,ld> pld;

#define mp make_pair
#define pb push_back
#define f first
#define s second
#define lb lower_bound
#define ub upper_bound
#define INPUTL(i,n) for(ll i=0 ; i<n ; i++)
const int MOD = 998244353 ; // 1000000007 , 1000000009 , 1000000023
const ll INF = (1e18);
const ld PI = 4*atan((ld)1);

void array_debug(vector<ll>ar){
	for(auto x: ar)cout << x << ' ';
	cout << '\n';
}

ll ncr[2001][2001]={0};

void generate_nCr(){
	ncr[0][0]=1;
	ncr[1][1]=1 , ncr[1][0]=1;
	for(ll i=2 ; i<=2000 ; i++){
		for(ll j=0 ; j<=i ; j++){
			if(j==0)ncr[i][j] = 1;
			else ncr[i][j] = ((ncr[i-1][j])%MOD + (ncr[i-1][j-1])%MOD)%MOD;
		}
	}
}

ll power(ll x,ll n,ll mod)
{
    ll result=1;
    while(n>0){
        if(n&1)result = (result * x)%mod;
        x=(x*x)%mod;
        n >>= 1;
    }
    return result;
}

int main() {
	#ifdef AVI
		freopen("input.txt" , "r" , stdin);
	#endif
	ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.precision(20);
    string s;
    cin >> s;
    ll c=0;
    for(ll i=1 ; i<s.length() ; i++){
    	if(s[i]==s[i-1] && s[i]!='1' && s[i-1]!='1'){
    		c++;
    		s[i]='1',s[i-1]='1';
    		ll j=max(i-2,ll(0)) , k=min(i+1,ll(s.length()-1));
    		ll x=0;
    		while(s[j]==s[k] && j>=0 && k<s.length()){
    			s[k]='1',s[j]='1';
    			c++;j--;k++;x++;
    		}
    		i+=x;
    	}
    }
    if(c%2==0)cout << "No";
    else cout << "Yes";
}


#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef long double ld;
typedef pair<int, int> pi;
typedef pair<ll,ll> pll;
typedef pair<ld,ld> pld;

#define mp make_pair
#define pb push_back
#define f first
#define s second
#define lb lower_bound
#define ub upper_bound
#define INPUTL(i,n) for(ll i=0 ; i<n ; i++)
const int MOD = 998244353 ; // 1000000007 , 1000000009 , 1000000023
const ll INF = (1e18);
const ld PI = 4*atan((ld)1);

void array_debug(vector<ll>ar){
	for(auto x: ar)cout << x << ' ';
	cout << '\n';
}

ll ncr[2001][2001]={0};

void generate_nCr(){
	ncr[0][0]=1;
	ncr[1][1]=1 , ncr[1][0]=1;
	for(ll i=2 ; i<=2000 ; i++){
		for(ll j=0 ; j<=i ; j++){
			if(j==0)ncr[i][j] = 1;
			else ncr[i][j] = ((ncr[i-1][j])%MOD + (ncr[i-1][j-1])%MOD)%MOD;
		}
	}
}

ll power(ll x,ll n,ll mod)
{
    ll result=1;
    while(n>0){
        if(n&1)result = (result * x)%mod;
        x=(x*x)%mod;
        n >>= 1;
    }
    return result;
}

int main() {
	#ifdef AVI
		freopen("input.txt" , "r" , stdin);
	#endif
	ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.precision(20);
    string s;
    cin >> s;
    ll c=0;
    for(ll i=1 ; i<s.length() ; i++){
    	if(s[i]==s[i-1] && (s[i]!='0' || s[i]!='1')){
    		c++;
    		ll j=max(i-2,ll(0)) , k=min(i+1,ll(s.length()-1));
    		s[i]='0',s[i-1]='1';
    		while(s[j]==s[k] && j>=0 && k<s.length()){
    			c++;j--;k++;
    		}
    	}
    }
    if(c%2==0)cout << "No";
    else cout << "Yes";
}


#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef long double ld;
typedef pair<int, int> pi;
typedef pair<ll,ll> pll;
typedef pair<ld,ld> pld;

#define mp make_pair
#define pb push_back
#define f first
#define s second
#define lb lower_bound
#define ub upper_bound
#define INPUTL(i,n) for(ll i=0 ; i<n ; i++)
const int MOD = 998244353 ; // 1000000007 , 1000000009 , 1000000023
const ll INF = (1e18);
const ld PI = 4*atan((ld)1);

void array_debug(vector<ll>ar){
	for(auto x: ar)cout << x << ' ';
	cout << '\n';
}

ll ncr[2001][2001]={0};

void generate_nCr(){
	ncr[0][0]=1;
	ncr[1][1]=1 , ncr[1][0]=1;
	for(ll i=2 ; i<=2000 ; i++){
		for(ll j=0 ; j<=i ; j++){
			if(j==0)ncr[i][j] = 1;
			else ncr[i][j] = ((ncr[i-1][j])%MOD + (ncr[i-1][j-1])%MOD)%MOD;
		}
	}
}

ll power(ll x,ll n,ll mod)
{
    ll result=1;
    while(n>0){
        if(n&1)result = (result * x)%mod;
        x=(x*x)%mod;
        n >>= 1;
    }
    return result;
}

int main() {
	#ifdef AVI
		freopen("input.txt" , "r" , stdin);
	#endif
	ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.precision(20);
    string s;
    cin >> s;
    ll c=0;
    for(ll i=1 ; i<s.length() ; i++){
      if(s[i]==s[i-1]){
        c++;
        ll j=i-2 , k=i+1;
        ll x=0;
        while( j>=0 && k<s.length() && s[j]==s[k]){
          c++;j--;k++;x++;
        }
        i+=x;
        i--;
      }
    }
    if(c%2==0)cout << "No";
    else cout << "Yes";
}


#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef long double ld;
typedef pair<int, int> pi;
typedef pair<ll,ll> pll;
typedef pair<ld,ld> pld;

#define mp make_pair
#define pb push_back
#define f first
#define s second
#define lb lower_bound
#define ub upper_bound
#define INPUTL(i,n) for(ll i=0 ; i<n ; i++)
const int MOD = 998244353 ; // 1000000007 , 1000000009 , 1000000023
const ll INF = (1e18);
const ld PI = 4*atan((ld)1);

void array_debug(vector<ll>ar){
    for(auto x: ar)cout << x << ' ';
    cout << '\n';
}

ll power(ll x,ll n)
{
    ll result=1;
    while(n>0){
        if(n&1)result = (result * x);
        x=(x*x);
        n >>= 1;
    }
    return result;
}

int main() {
    #ifdef AVI
        freopen("input.txt" , "r" , stdin);
    #endif
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.precision(20);

    string s;
    cin >> s;
    stack<char>ar;
    //ar.push(s[0]);
    ll res = 0;
    for(ll i=0 ; i<s.length() ; i++){
    	if(ar.empty())ar.push(s[i]);
    	else if(ar.top()==s[i]){
    		res++;
    		ar.pop();
    	}
    	else ar.push(s[i]);
    }
    if(res&1)cout << "Yes";
    else cout << "No";
}


#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef long double ld;
typedef pair<int, int> pi;
typedef pair<ll,ll> pll;
typedef pair<ld,ld> pld;

#define mp make_pair
#define pb push_back
#define f first
#define s second
#define lb lower_bound
#define ub upper_bound
const int MOD = 1000000007; // 998244353 , 1000000009 , 1000000023
const ll INF = (1e18);
const ld PI = 4*atan((ld)1);

int main() {
    #ifdef AVI
        freopen("input.txt" , "r" , stdin);
    #endif
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.precision(20);
    string s;
    cin >> s;
    ll c=0;
    for(ll i=1 ; i<s.length() ; i++){
        if(s[i]==s[i-1]){
            c++;
            s.erase(s.begin()+i-1,s.begin()+i);
            ll j=max(i-2,ll(0)) , k=min(i+1,ll(s.length()-1));
            ll x=0;
            while(s[j]==s[k] && j>=0 && k<s.length()){
                s.erase(s.begin()+j);s.erase(s.begin()+k-1);
                c++;
            }
            //i+=x;
        }
    }
    if(c%2==0)cout << "No";
    else cout << "Yes";
}


#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef long double ld;
typedef pair<int, int> pi;
typedef pair<ll,ll> pll;
typedef pair<ld,ld> pld;

#define mp make_pair
#define pb push_back
#define f first
#define s second
#define lb lower_bound
#define ub upper_bound
const int MOD = 1000000007; // 998244353 , 1000000009 , 1000000023
const ll INF = (1e18);
const ld PI = 4*atan((ld)1);
void removeDuplicates(string S){

   int n = S.length();
   if (n < 2)
     return;
   int j = 0;
   for (int i=1; i<n; i++)
   {
       if (S[j] != S[i])
       {
           j++;
           S[j] = S[i];
       }
    }
    j++;
    S[j] = '\0';
}
int main() {
    #ifdef AVI
        freopen("input.txt" , "r" , stdin);
    #endif
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.precision(20);
    string s;
    cin >> s;
    ll c=0;
    for(ll i=1 ; i<s.length() ; i++){
      if(s[i]==s[i-1]){
        c++;
        ll j=i-2 , k=i+1;
        ll x=0;
        while( j>=0 && k<s.length() && s[j]==s[k]){
          c++;j--;k++;x++;
        }
        i+=(x+1);
      }
    }
    if(c%2==0)cout << "No";
    else cout << "Yes";
}


#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef long double ld;
typedef pair<int, int> pi;
typedef pair<ll,ll> pll;
typedef pair<ld,ld> pld;

#define mp make_pair
#define pb push_back
#define f first
#define s second
#define lb lower_bound
#define ub upper_bound
#define INPUTL(i,n) for(ll i=0 ; i<n ; i++)
const int MOD = 998244353 ; // 1000000007 , 1000000009 , 1000000023
const ll INF = (1e18);
const ld PI = 4*atan((ld)1);

void array_debug(vector<ll>ar){
	for(auto x: ar)cout << x << ' ';
	cout << '\n';
}

ll ncr[2001][2001]={0};

void generate_nCr(){
	ncr[0][0]=1;
	ncr[1][1]=1 , ncr[1][0]=1;
	for(ll i=2 ; i<=2000 ; i++){
		for(ll j=0 ; j<=i ; j++){
			if(j==0)ncr[i][j] = 1;
			else ncr[i][j] = ((ncr[i-1][j])%MOD + (ncr[i-1][j-1])%MOD)%MOD;
		}
	}
}

ll power(ll x,ll n,ll mod)
{
    ll result=1;
    while(n>0){
        if(n&1)result = (result * x)%mod;
        x=(x*x)%mod;
        n >>= 1;
    }
    return result;
}

int main() {
	#ifdef AVI
		freopen("input.txt" , "r" , stdin);
	#endif
	ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.precision(20);
    string s;
    cin >> s;
    ll c=0;
    for(ll i=1 ; i<s.length() ; i++){
    	if(s[i]==s[i-1]){
    		c++;
    		s.erase(s.begin()+i-1,s.begin()+i);
    		ll j=max(i-2,ll(0)) , k=min(i+1,ll(s.length()-1));
    		ll x=0;
    		while(s[j]==s[k] && j>=0 && k<s.length()){
    			c++;j--;k++;x++;
    		}
    		i+=x;
    	}
    }
    if(c%2==0)cout << "No";
    else cout << "Yes";
}


#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef long double ld;
typedef pair<int, int> pi;
typedef pair<ll,ll> pll;
typedef pair<ld,ld> pld;

#define mp make_pair
#define pb push_back
#define f first
#define s second
#define lb lower_bound
#define ub upper_bound
#define INPUTL(i,n) for(ll i=0 ; i<n ; i++)
const int MOD = 998244353 ; // 1000000007 , 1000000009 , 1000000023
const ll INF = (1e18);
const ld PI = 4*atan((ld)1);

void array_debug(vector<ll>ar){
	for(auto x: ar)cout << x << ' ';
	cout << '\n';
}

ll ncr[2001][2001]={0};

void generate_nCr(){
	ncr[0][0]=1;
	ncr[1][1]=1 , ncr[1][0]=1;
	for(ll i=2 ; i<=2000 ; i++){
		for(ll j=0 ; j<=i ; j++){
			if(j==0)ncr[i][j] = 1;
			else ncr[i][j] = ((ncr[i-1][j])%MOD + (ncr[i-1][j-1])%MOD)%MOD;
		}
	}
}

ll power(ll x,ll n,ll mod)
{
    ll result=1;
    while(n>0){
        if(n&1)result = (result * x)%mod;
        x=(x*x)%mod;
        n >>= 1;
    }
    return result;
}

int main() {
	#ifdef AVI
		freopen("input.txt" , "r" , stdin);
	#endif
	ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.precision(20);
    string s;
    cin >> s;
    ll c=0;
    for(ll i=1 ; i<s.length() ; i++){
    	if(s[i]==s[i-1]){
    		c++;
    		s.erase(s.begin()+i-1,s.begin()+i);
    		ll j=max(i-2,ll(0)) , k=min(i+1,ll(s.length()-1));
    		ll x=0;
    		while(s[j]==s[k] && j>=0 && k<s.length()){
    			s.erase(s.begin()+j);s.erase(s.begin()+k-1);
    			c++;j--;k++;x++;
    		}
    		i+=x;
    	}
    }
    if(c%2==0)cout << "No";
    else cout << "Yes";
}


#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef long double ld;
typedef pair<int, int> pi;
typedef pair<ll,ll> pll;
typedef pair<ld,ld> pld;

#define mp make_pair
#define pb push_back
#define f first
#define s second
#define lb lower_bound
#define ub upper_bound
#define INPUTL(i,n) for(ll i=0 ; i<n ; i++)
const int MOD = 998244353 ; // 1000000007 , 1000000009 , 1000000023
const ll INF = (1e18);
const ld PI = 4*atan((ld)1);

void array_debug(vector<ll>ar){
    for(auto x: ar)cout << x << ' ';
    cout << '\n';
}

ll power(ll x,ll n)
{
    ll result=1;
    while(n>0){
        if(n&1)result = (result * x);
        x=(x*x);
        n >>= 1;
    }
    return result;
}

int main() {
    #ifdef AVI
        freopen("input.txt" , "r" , stdin);
    #endif
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.precision(20);

    string s;
    cin >> s;
    stack<char>ar;
    //ar.push(s[0]);
    ll res = 0;
    for(ll i=0 ; i<s.length() ; i++){
    	if(ar.empty())ar.push(s[i]);
    	if(ar.top()==s[i]){
    		res++;
    		ar.pop();
    	}
    	else ar.push(s[i]);
    }
    if(res&1)cout << "Yes";
    else cout << "No";
}


#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef long double ld;
typedef pair<int, int> pi;
typedef pair<ll,ll> pll;
typedef pair<ld,ld> pld;

#define mp make_pair
#define pb push_back
#define f first
#define s second
#define lb lower_bound
#define ub upper_bound
#define INPUTL(i,n) for(ll i=0 ; i<n ; i++)
const int MOD = 998244353 ; // 1000000007 , 1000000009 , 1000000023
const ll INF = (1e18);
const ld PI = 4*atan((ld)1);

void array_debug(vector<ll>ar){
	for(auto x: ar)cout << x << ' ';
	cout << '\n';
}

ll ncr[2001][2001]={0};

void generate_nCr(){
	ncr[0][0]=1;
	ncr[1][1]=1 , ncr[1][0]=1;
	for(ll i=2 ; i<=2000 ; i++){
		for(ll j=0 ; j<=i ; j++){
			if(j==0)ncr[i][j] = 1;
			else ncr[i][j] = ((ncr[i-1][j])%MOD + (ncr[i-1][j-1])%MOD)%MOD;
		}
	}
}

ll power(ll x,ll n,ll mod)
{
    ll result=1;
    while(n>0){
        if(n&1)result = (result * x)%mod;
        x=(x*x)%mod;
        n >>= 1;
    }
    return result;
}

int main() {
	#ifdef AVI
		freopen("input.txt" , "r" , stdin);
	#endif
	ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.precision(20);
    string s;
    cin >> s;
    ll c=0;
    for(ll i=1 ; i<s.length() ; i++){
      if(s[i]==s[i-1]){
        c++;
        ll j=i-2 , k=i+1;
        ll x=0;
        while( j>=0 && k<s.length() && s[j]==s[k]){
          c++;j--;k++;x++;
        }
        s[i+x-1]='1';
        i+=x;
      }
    }
    if(c%2==0)cout << "No";
    else cout << "Yes";
}


#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef long double ld;
typedef pair<int, int> pi;
typedef pair<ll,ll> pll;
typedef pair<ld,ld> pld;

#define mp make_pair
#define pb push_back
#define f first
#define s second
#define lb lower_bound
#define ub upper_bound
const int MOD = 1000000007; // 998244353 , 1000000009 , 1000000023
const ll INF = (1e18);
const ld PI = 4*atan((ld)1);
void removeDuplicates(string S){

   int n = S.length();
   if (n < 2)
     return;
   int j = 0;
   for (int i=1; i<n; i++)
   {
       if (S[j] != S[i])
       {
           j++;
           S[j] = S[i];
       }
    }
    j++;
    S[j] = '\0';
}
int main() {
    #ifdef AVI
        freopen("input.txt" , "r" , stdin);
    #endif
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.precision(20);
    string s;
    cin >> s;
    ll c=0;
    for(ll i=1 ; i<s.length() ; i++){
        if(s[i]==s[i-1]){
            c++;
            s.erase(s.begin()+i-1,s.begin()+i);
            ll j=max(i-2,ll(0)) , k=min(i+1,ll(s.length()-1));
            ll x=0;
            while(s[j]==s[k] && j>=0 && k<s.length()){
                s.erase(s.begin()+j);s.erase(s.begin()+k-1);
                c++;j--;k++;x++;
            }
            //i+=x;
        }
    }
    if(c%2==0)cout << "No";
    else cout << "Yes";
}


#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef long double ld;
typedef pair<int, int> pi;
typedef pair<ll,ll> pll;
typedef pair<ld,ld> pld;

#define mp make_pair
#define pb push_back
#define f first
#define s second
#define lb lower_bound
#define ub upper_bound
const int MOD = 1000000007; // 998244353 , 1000000009 , 1000000023
const ll INF = (1e18);
const ld PI = 4*atan((ld)1);
void removeDuplicates(string S){

   int n = S.length();
   if (n < 2)
     return;
   int j = 0;
   for (int i=1; i<n; i++)
   {
       if (S[j] != S[i])
       {
           j++;
           S[j] = S[i];
       }
    }
    j++;
    S[j] = '\0';
}
int main() {
    #ifdef AVI
        freopen("input.txt" , "r" , stdin);
    #endif
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.precision(20);
    string s;
    cin >> s;
    ll c=0;
    for(ll i=1 ; i<s.length() ; i++){
        if(s[i]==s[i-1]){
            c++;
            s.erase(s.begin()+i-1,s.begin()+i);
            ll j=i-2 , k=i+1;
            ll x=0;
            while(s[j]==s[k] && j>=0 && k<s.length()){
                s.erase(s.begin()+j);s.erase(s.begin()+k-1);
                c++;j--;k++;x++;
            }
            //i+=x;
        }
    }
    if(c%2==0)cout << "No";
    else cout << "Yes";
}


#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef long double ld;
typedef pair<int, int> pi;
typedef pair<ll,ll> pll;
typedef pair<ld,ld> pld;

#define mp make_pair
#define pb push_back
#define f first
#define s second
#define lb lower_bound
#define ub upper_bound
const int MOD = 1000000007; // 998244353 , 1000000009 , 1000000023
const ll INF = (1e18);
const ld PI = 4*atan((ld)1);
void removeDuplicates(string S){

   int n = S.length();
   if (n < 2)
     return;
   int j = 0;
   for (int i=1; i<n; i++)
   {
       if (S[j] != S[i])
       {
           j++;
           S[j] = S[i];
       }
    }

}
int main() {
    #ifdef AVI
        freopen("input.txt" , "r" , stdin);
    #endif
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.precision(20);

    #ifdef AVI
        freopen("input.txt" , "r" , stdin);
    #endif
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.precision(20);
    string s;
    cin >> s;
    string c=s;
    removeDuplicates(s);
    ll n = c.length() - s.length();
    n/=2;
    if(n%2==0)cout << "No";
    else cout << "Yes";

}


#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef long double ld;
typedef pair<int, int> pi;
typedef pair<ll,ll> pll;
typedef pair<ld,ld> pld;

#define mp make_pair
#define pb push_back
#define f first
#define s second
#define lb lower_bound
#define ub upper_bound
#define INPUTL(i,n) for(ll i=0 ; i<n ; i++)
const int MOD = 998244353 ; // 1000000007 , 1000000009 , 1000000023
const ll INF = (1e18);
const ld PI = 4*atan((ld)1);

void array_debug(vector<ll>ar){
    for(auto x: ar)cout << x << ' ';
    cout << '\n';
}

ll power(ll x,ll n)
{
    ll result=1;
    while(n>0){
        if(n&1)result = (result * x);
        x=(x*x);
        n >>= 1;
    }
    return result;
}

int main() {
    #ifdef AVI
        freopen("input.txt" , "r" , stdin);
    #endif
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.precision(20);

    string s;
    cin >> s;
    stack<char>ar;
    ar.push(s[0]);
    ll res = 0;
    for(ll i=0 ; i<s.length() ; i++){
    	if(ar.empty())ar.push(s[i]);
    	if(ar.top()==s[i]){
    		res++;
    		ar.pop();
    	}
    	else ar.push(s[i]);
    }
    if(res&1)cout << "Yes";
    else cout << "No";
}


#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef long double ld;
typedef pair<int, int> pi;
typedef pair<ll,ll> pll;
typedef pair<ld,ld> pld;

#define mp make_pair
#define pb push_back
#define f first
#define s second
#define lb lower_bound
#define ub upper_bound
#define INPUTL(i,n) for(ll i=0 ; i<n ; i++)
const int MOD = 998244353 ; // 1000000007 , 1000000009 , 1000000023
const ll INF = (1e18);
const ld PI = 4*atan((ld)1);

void array_debug(vector<ll>ar){
	for(auto x: ar)cout << x << ' ';
	cout << '\n';
}

ll ncr[2001][2001]={0};

void generate_nCr(){
	ncr[0][0]=1;
	ncr[1][1]=1 , ncr[1][0]=1;
	for(ll i=2 ; i<=2000 ; i++){
		for(ll j=0 ; j<=i ; j++){
			if(j==0)ncr[i][j] = 1;
			else ncr[i][j] = ((ncr[i-1][j])%MOD + (ncr[i-1][j-1])%MOD)%MOD;
		}
	}
}

ll power(ll x,ll n,ll mod)
{
    ll result=1;
    while(n>0){
        if(n&1)result = (result * x)%mod;
        x=(x*x)%mod;
        n >>= 1;
    }
    return result;
}

int main() {
	#ifdef AVI
		freopen("input.txt" , "r" , stdin);
	#endif
	ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.precision(20);
    string s;
    cin >> s;
    ll c=0;
    for(ll i=1 ; i<s.length() ; i++){
      if(s[i]==s[i-1]){
        c++;
        ll j=i-2 , k=i+1;
        ll x=0;
        while( j>=0 && k<s.length() && s[j]==s[k]){
          c++;j--;k++;x++;
        }
        i+=x;
      }
    }
    if(c%2==0)cout << "No";
    else cout << "Yes";
}


#include <bits/stdc++.h>

using namespace std;
using ull = unsigned long long;
using ll = long long;
using ld = long double;
using D = double;
using ii = pair<int, int>;
using vi = vector<int>;
using vii = vector<ii>;

#define pb push_back
#define mp make_pair
#define all(x) x.begin(),x.end()
#define makeunique(x) sort(all(x)), (x).resize(unique(all(x)) - (x).begin())
#define rep(i, x)  for(int i = 0; i < (x); i++)
#define rrep(i, x) for(int i = (x - 1); i >= 0; i--)
#define sqrt(x) sqrt(abs(x))
#define y1 y1_1234413
#define j1 j1_235
#define y0 y0_235
#define j0 j0_256
#define fi first
#define se second
#define re return
#define prev PREV
#define next NEXT
#define sz(x) ((int)x.size())

template<typename T> T sqr(T a) { re a * a; }
template<typename T> T gcd(T a, T b) { re b ? gcd(b, a % b) : a; }
template<typename T> T sgn(T a) { re a > 0 ? 1 : (a < 0 ? -1 : 0); }
template<typename T> T abs(T a) { re a > 0 ? a : -a; }

const int inf = 2e9;
const ld st = 0.000001;
const ld pi = acos((ld)-1);

#define FILENAME ""

int main()
{
    ios::sync_with_stdio(0);
    cin.tie(NULL);
//	freopen(FILENAME ".in", "r", stdin);
//	freopen(FILENAME ".out", "w", stdout);
    string s;
    cin >> s;
    ll ans = 0;
    for (int i = 0; i < sz(s) - 1; i++) {
        ll k = i;
        ll r = 0;
        while (s[k + 1] == s[k]) {
            r++;
            k++;
        }
        ans += (r + 1)/2;
        if ((r + 1) % 2 == 0) {
            if (s[i - 1] == s[k + 1]) {
                ans++;
            }
        }
        i += (r);
    }
    if (ans % 2 == 0) {
        cout << "No";
    }
    else {
        cout << "Yes";
    }
    return 0;
}


#include <bits/stdc++.h>

using namespace std;
using ull = unsigned long long;
using ll = long long;
using ld = long double;
using D = double;
using ii = pair<int, int>;
using vi = vector<int>;
using vii = vector<ii>;

#define pb push_back
#define mp make_pair
#define all(x) x.begin(),x.end()
#define makeunique(x) sort(all(x)), (x).resize(unique(all(x)) - (x).begin())
#define rep(i, x)  for(int i = 0; i < (x); i++)
#define rrep(i, x) for(int i = (x - 1); i >= 0; i--)
#define sqrt(x) sqrt(abs(x))
#define y1 y1_1234413
#define j1 j1_235
#define y0 y0_235
#define j0 j0_256
#define fi first
#define se second
#define re return
#define prev PREV
#define next NEXT
#define sz(x) ((int)x.size())

template<typename T> T sqr(T a) { re a * a; }
template<typename T> T gcd(T a, T b) { re b ? gcd(b, a % b) : a; }
template<typename T> T sgn(T a) { re a > 0 ? 1 : (a < 0 ? -1 : 0); }
template<typename T> T abs(T a) { re a > 0 ? a : -a; }

const int inf = 2e9;
const ld st = 0.000001;
const ld pi = acos((ld)-1);

#define FILENAME ""

int main()
{
    ios::sync_with_stdio(0);
    cin.tie(NULL);
//	freopen(FILENAME ".in", "r", stdin);
//	freopen(FILENAME ".out", "w", stdout);
    string s;
    cin >> s;
    ll ans = 0;
    bool f = true;
    for (int i = 0; i < sz(s) - 1; i++) {
        ll k = i;
        ll r = 0;
        while (s[k + 1] == s[k]) {
            r++;
            k++;
        }
        ans += (r + 1)/2;
        if ((r + 1) % 2 == 0) {
            if (i > 0 && s[i - 1] == s[k + 1] && f == false) {
                ans++;
                i++;
            }
            f = true;
        }
        else {
            f = false;
        }
        i += (r);
    }
    if (ans % 2 == 0) {
        cout << "No";
    }
    else {
        cout << "Yes";
    }
    return 0;
}


#include <bits/stdc++.h>

using namespace std;
using ull = unsigned long long;
using ll = long long;
using ld = long double;
using D = double;
using ii = pair<int, int>;
using vi = vector<int>;
using vii = vector<ii>;

#define pb push_back
#define mp make_pair
#define all(x) x.begin(),x.end()
#define makeunique(x) sort(all(x)), (x).resize(unique(all(x)) - (x).begin())
#define rep(i, x)  for(int i = 0; i < (x); i++)
#define rrep(i, x) for(int i = (x - 1); i >= 0; i--)
#define sqrt(x) sqrt(abs(x))
#define y1 y1_1234413
#define j1 j1_235
#define y0 y0_235
#define j0 j0_256
#define fi first
#define se second
#define re return
#define prev PREV
#define next NEXT
#define sz(x) ((int)x.size())

template<typename T> T sqr(T a) { re a * a; }
template<typename T> T gcd(T a, T b) { re b ? gcd(b, a % b) : a; }
template<typename T> T sgn(T a) { re a > 0 ? 1 : (a < 0 ? -1 : 0); }
template<typename T> T abs(T a) { re a > 0 ? a : -a; }

const int inf = 2e9;
const ld st = 0.000001;
const ld pi = acos((ld)-1);

#define FILENAME ""

ll a[200002];

int main()
{
    ios::sync_with_stdio(0);
    cin.tie(NULL);
//	freopen(FILENAME ".in", "r", stdin);
//	freopen(FILENAME ".out", "w", stdout);
	string s;
	cin >> s;
	deque <char> a;
	ll ans = 0;
	for (int i = 0; i < sz(s); i++) {
		if (sz(a)) {
		 	if (a.back() == s[i]) {
		 	 	ans++;
		 	 	a.pop_back();
			}
			else {
			 	a.pb(s[i]);
			}
	 	}
	 	else {
	 	 	a.pb(s[i]);
	 	}
	}
	if (ans % 2 == 0) {
	 	re cout << "No", 0;
	}
	cout << "Yes";
	return 0;
}


#include <bits/stdc++.h>

using namespace std;
using ull = unsigned long long;
using ll = long long;
using ld = long double;
using D = double;
using ii = pair<int, int>;
using vi = vector<int>;
using vii = vector<ii>;

#define pb push_back
#define mp make_pair
#define all(x) x.begin(),x.end()
#define makeunique(x) sort(all(x)), (x).resize(unique(all(x)) - (x).begin())
#define rep(i, x)  for(int i = 0; i < (x); i++)
#define rrep(i, x) for(int i = (x - 1); i >= 0; i--)
#define sqrt(x) sqrt(abs(x))
#define y1 y1_1234413
#define j1 j1_235
#define y0 y0_235
#define j0 j0_256
#define fi first
#define se second
#define re return
#define prev PREV
#define next NEXT
#define sz(x) ((int)x.size())

template<typename T> T sqr(T a) { re a * a; }
template<typename T> T gcd(T a, T b) { re b ? gcd(b, a % b) : a; }
template<typename T> T sgn(T a) { re a > 0 ? 1 : (a < 0 ? -1 : 0); }
template<typename T> T abs(T a) { re a > 0 ? a : -a; }

const int inf = 2e9;
const ld st = 0.000001;
const ld pi = acos((ld)-1);

#define FILENAME ""

int main()
{
    ios::sync_with_stdio(0);
    cin.tie(NULL);
//	freopen(FILENAME ".in", "r", stdin);
//	freopen(FILENAME ".out", "w", stdout);
    string s;
    cin >> s;
    ll ans = 0;
    bool f = true;
    for (int i = 0; i < sz(s) - 1; i++) {
        ll k = i;
        ll r = 0;
        while (s[k + 1] == s[k]) {
            r++;
            k++;
        }
        ans += (r + 1)/2;
        if ((r + 1) % 2 == 0) {
            if (i > 0 && s[i - 1] == s[k + 1] && f == false) {
                ans++;
            }
            f = true;
        }
        else {
            f = false;
        }
        i += (r);
    }
    if (ans % 2 == 0) {
        cout << "No";
    }
    else {
        cout << "Yes";
    }
    return 0;
}


#include <bits/stdc++.h>

using namespace std;
using ull = unsigned long long;
using ll = long long;
using ld = long double;
using D = double;
using ii = pair<int, int>;
using vi = vector<int>;
using vii = vector<ii>;

#define pb push_back
#define mp make_pair
#define all(x) x.begin(),x.end()
#define makeunique(x) sort(all(x)), (x).resize(unique(all(x)) - (x).begin())
#define rep(i, x)  for(int i = 0; i < (x); i++)
#define rrep(i, x) for(int i = (x - 1); i >= 0; i--)
#define sqrt(x) sqrt(abs(x))
#define y1 y1_1234413
#define j1 j1_235
#define y0 y0_235
#define j0 j0_256
#define fi first
#define se second
#define re return
#define prev PREV
#define next NEXT
#define sz(x) ((int)x.size())

template<typename T> T sqr(T a) { re a * a; }
template<typename T> T gcd(T a, T b) { re b ? gcd(b, a % b) : a; }
template<typename T> T sgn(T a) { re a > 0 ? 1 : (a < 0 ? -1 : 0); }
template<typename T> T abs(T a) { re a > 0 ? a : -a; }

const int inf = 2e9;
const ld st = 0.000001;
const ld pi = acos((ld)-1);

#define FILENAME ""

int main()
{
    ios::sync_with_stdio(0);
    cin.tie(NULL);
//	freopen(FILENAME ".in", "r", stdin);
//	freopen(FILENAME ".out", "w", stdout);
    string s;
    cin >> s;
    ll ans = 0;
    ll k = -1;
    set <char> s1;
    ll temp = 0;
    ll ans1 = 1;
    for (char i = 'a'; i <= 'z'; i++) {
        for (int j = 0; j < sz(s); j++) {
            if (s[j] == i) {
                if (k == -1) {
                    k = j;
                }
                else {
                    if (abs(j - k) == 1) {
                        ans1++;
                    }
                    else if (abs(j - k) % 2 != 0 && s1.size() == 1 && temp % 2 == 0) {
                        ans++;
                    }
                    s1.clear();
                    k = j;
                    temp = 0;
                }
            }
            else {
                s1.insert(s[j]);
                temp++;
            }
        }
        s1.clear();
        temp = 0;
        k = -1;
    }
    ans = ans1/2 + ans;
    if (ans % 2 == 0) {
        cout << "No";
    }
    else {
        cout << "Yes";
    }
    return 0;
}


#include <bits/stdc++.h>

using namespace std;
using ull = unsigned long long;
using ll = long long;
using ld = long double;
using D = double;
using ii = pair<int, int>;
using vi = vector<int>;
using vii = vector<ii>;

#define pb push_back
#define mp make_pair
#define all(x) x.begin(),x.end()
#define makeunique(x) sort(all(x)), (x).resize(unique(all(x)) - (x).begin())
#define rep(i, x)  for(int i = 0; i < (x); i++)
#define rrep(i, x) for(int i = (x - 1); i >= 0; i--)
#define sqrt(x) sqrt(abs(x))
#define y1 y1_1234413
#define j1 j1_235
#define y0 y0_235
#define j0 j0_256
#define fi first
#define se second
#define re return
#define prev PREV
#define next NEXT
#define sz(x) ((int)x.size())

template<typename T> T sqr(T a) { re a * a; }
template<typename T> T gcd(T a, T b) { re b ? gcd(b, a % b) : a; }
template<typename T> T sgn(T a) { re a > 0 ? 1 : (a < 0 ? -1 : 0); }
template<typename T> T abs(T a) { re a > 0 ? a : -a; }

const int inf = 2e9;
const ld st = 0.000001;
const ld pi = acos((ld)-1);

#define FILENAME ""

int main()
{
    ios::sync_with_stdio(0);
    cin.tie(NULL);
//	freopen(FILENAME ".in", "r", stdin);
//	freopen(FILENAME ".out", "w", stdout);
    string s;
    cin >> s;
    ll ans = 0;
    ll k = -1;
    set <char> s1;
    ll temp = 0;
    for (char i = 'a'; i <= 'z'; i++) {
        for (int j = 0; j < sz(s); j++) {
            if (s[j] == i) {
                if (k == -1) {
                    k = j;
                }
                else {
                    if (abs(j - k) == 1) {
                        ans++;
                    }
                    else if (abs(j - k) % 2 != 0 && s1.size() == 1 && temp % 2 == 0) {
                        ans++;
                    }
                    s1.clear();
                    k = j;
                    temp = 0;
                }
            }
            else {
                s1.insert(s[j]);
                temp++;
            }
        }
        s1.clear();
        temp = 0;
        k = -1;
    }
    if (ans % 2 == 0) {
        cout << "No";
    }
    else {
        cout << "Yes";
    }
    return 0;
}


import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class C {

	public static void main(String[] args) throws IOException {
		Scanner sc = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);
		int n = sc.nextInt();
		int[] a = new int[n]; a[0] = sc.nextInt();
		boolean can = true;
		for(int i = 1; i < n; i++)
		{
			a[i] = sc.nextInt();
			if(a[i] % a[0] != 0)
			{
				can = false;
				break;
			}
		}
		if(!can) out.println(-1);
		else
		{
			out.println(2 * n);
			for(int i = 0; i < n; i++)
				out.print(a[0] + " "  + a[i] + " ");
		}
		out.flush();
		out.close();
	}

	static class Scanner
	{
		StringTokenizer st;
		BufferedReader br;

		Scanner(InputStream system) {br = new BufferedReader(new InputStreamReader(system));}
		Scanner(String file) throws FileNotFoundException {br = new BufferedReader(new FileReader(file));}
		String next() throws IOException
		{
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}
		String nextLine()throws IOException{return br.readLine();}
		int nextInt() throws IOException {return Integer.parseInt(next());}
		double nextDouble() throws IOException {return Double.parseDouble(next());}
		char nextChar()throws IOException{return next().charAt(0);}
		Long nextLong()throws IOException{return Long.parseLong(next());}
		boolean ready() throws IOException{return br.ready();}
		void waitForInput(){for(long i = 0; i < 3e9; i++);}
	}
}


import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.HashSet;
import java.util.StringTokenizer;

public class C {

	public static void main(String[] args) throws IOException {
		Scanner sc = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);
		int n = sc.nextInt();
		int[] a = new int[n];
		HashSet<Integer> set = new HashSet<>();
		for(int i = 0; i < n; i++) set.add(a[i] = sc.nextInt());
		boolean can = true;
		for(int i = 0; i < n; i++)
			for(int j = 0; j < n; j++)
				if(!set.contains(gcd(a[i], a[j])))
					can = false;
		if(!can)
			out.println(-1);
		else
		{
			for(int x : a)
				out.print(x + " ");
			out.println();
		}
		out.flush();
		out.close();
	}

	static int gcd(int a, int b)
	{
		if(b == 0) return a;
		return gcd(b, a % b);
	}

	static class Scanner
	{
		StringTokenizer st;
		BufferedReader br;

		Scanner(InputStream system) {br = new BufferedReader(new InputStreamReader(system));}
		Scanner(String file) throws FileNotFoundException {br = new BufferedReader(new FileReader(file));}
		String next() throws IOException
		{
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}
		String nextLine()throws IOException{return br.readLine();}
		int nextInt() throws IOException {return Integer.parseInt(next());}
		double nextDouble() throws IOException {return Double.parseDouble(next());}
		char nextChar()throws IOException{return next().charAt(0);}
		Long nextLong()throws IOException{return Long.parseLong(next());}
		boolean ready() throws IOException{return br.ready();}
		void waitForInput(){for(long i = 0; i < 3e9; i++);}
	}
}


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Pradyumn
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        FastReader in = new FastReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskC solver = new TaskC();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskC {
        public void solve(int testNumber, FastReader in, PrintWriter out) {
            int n = in.nextInt();
            int[] a = in.nextIntArray(n);
            int min = (int) 1e7;
            for (int aa : a) min = Math.min(min, aa);
            for (int aa : a)
                if (aa % min != 0) {
                    out.println(-1);
                    return;
                }
            out.println(n * 2);
            for (int i = 0; i < n * 2; i++) {
                if (i != 0) out.print(" ");
                if (i % 2 == 0) out.print(a[i / 2]);
                else out.print(min);
            }
            out.println();
        }

    }

    static class FastReader {
        private InputStream stream;
        private byte[] buf = new byte[8192];
        private int curChar;
        private int pnumChars;
        private FastReader.SpaceCharFilter filter;

        public FastReader(InputStream stream) {
            this.stream = stream;
        }

        private int pread() {
            if (pnumChars == -1) {
                throw new InputMismatchException();
            }
            if (curChar >= pnumChars) {
                curChar = 0;
                try {
                    pnumChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (pnumChars <= 0) {
                    return -1;
                }
            }
            return buf[curChar++];
        }

        public int nextInt() {
            int c = pread();
            while (isSpaceChar(c))
                c = pread();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = pread();
            }
            int res = 0;
            do {
                if (c == ',') {
                    c = pread();
                }
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res *= 10;
                res += c - '0';
                c = pread();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public int[] nextIntArray(int n) {
            int[] array = new int[n];
            for (int i = 0; i < n; i++) {
                array[i] = nextInt();
            }
            return array;
        }

        private boolean isSpaceChar(int c) {
            if (filter != null) {
                return filter.isSpaceChar(c);
            }
            return isWhitespace(c);
        }

        private static boolean isWhitespace(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        private interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);

        }

    }
}


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Pradyumn
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        FastReader in = new FastReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskC solver = new TaskC();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskC {
        public void solve(int testNumber, FastReader in, PrintWriter out) {
            int n = in.nextInt();
            int[] a = in.nextIntArray(n);
            int min = (int) 1e7;
            for (int aa : a) min = Math.min(min, aa);

            for (int i = 0; i < n; i++)
                if (a[i] % min != 0) {
                    out.println(-1);
                    return;
                }
            out.println(n * 2);
            ArrayUtils.printArray(out, a);
            ArrayUtils.printArray(out, a);
        }

    }

    static class ArrayUtils {
        public static void printArray(PrintWriter out, int[] array) {
            if (array.length == 0) return;
            for (int i = 0; i < array.length; i++) {
                if (i != 0) out.print(" ");
                out.print(array[i]);
            }
            out.println();
        }

    }

    static class FastReader {
        private InputStream stream;
        private byte[] buf = new byte[8192];
        private int curChar;
        private int pnumChars;
        private FastReader.SpaceCharFilter filter;

        public FastReader(InputStream stream) {
            this.stream = stream;
        }

        private int pread() {
            if (pnumChars == -1) {
                throw new InputMismatchException();
            }
            if (curChar >= pnumChars) {
                curChar = 0;
                try {
                    pnumChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (pnumChars <= 0) {
                    return -1;
                }
            }
            return buf[curChar++];
        }

        public int nextInt() {
            int c = pread();
            while (isSpaceChar(c))
                c = pread();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = pread();
            }
            int res = 0;
            do {
                if (c == ',') {
                    c = pread();
                }
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res *= 10;
                res += c - '0';
                c = pread();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public int[] nextIntArray(int n) {
            int[] array = new int[n];
            for (int i = 0; i < n; i++) {
                array[i] = nextInt();
            }
            return array;
        }

        private boolean isSpaceChar(int c) {
            if (filter != null) {
                return filter.isSpaceChar(c);
            }
            return isWhitespace(c);
        }

        private static boolean isWhitespace(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        private interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);

        }

    }
}


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Collection;
import java.io.IOException;
import java.util.stream.Collectors;
import java.io.InputStreamReader;
import java.util.TreeSet;
import java.util.stream.Stream;
import java.util.StringTokenizer;
import java.io.BufferedReader;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskC solver = new TaskC();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskC {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
            int M = in.nextInt();
            int[] S = new int[M];
            for (int i = 0; i < M; i++) {
                S[i] = in.nextInt();
            }

            TreeSet<Integer> set = new TreeSet<>();
            int[][] G = new int[M][M];
            for (int i = 0; i < M; i++) {
                G[i][i] = S[i];
                set.add(S[i]);
                for (int j = i + 1; j < M; j++) {
                    G[i][j] = gcd(G[i][j - 1], S[j]);
                    set.add(G[i][j]);
                }
            }

            if (set.size() == M) {
                out.println(M);
                out.println(set.stream().map(Object::toString).collect(Collectors.joining(" ")));
            } else {
                out.println(-1);
            }
        }

        private int gcd(int a, int b) {
            if (b == 0) return a;
            return gcd(b, a % b);
        }

    }

    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

    }
}


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskC solver = new TaskC();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskC {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
            int M = in.nextInt();
            int[] S = new int[M];
            for (int i = 0; i < M; i++) {
                S[i] = in.nextInt();
            }
            int min = S[0];
            for (int i = 0; i < M; i++) {
                if (S[i] % min != 0) {
                    out.println(-1);
                    return;
                }
            }

            out.print((2 * M - 1) + "\n" + S[0]);
            for (int i = 1; i <= M - 1; i++) {
                out.print(" " + min + " " + S[i]);
            }
            out.println();

        }

    }

    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

    }
}


import java.io.*;
import java.util.*;

public class C447PC {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));

    int N = Integer.parseInt(in.readLine());
    int[] gcdSet = new int[N];

    StringTokenizer st = new StringTokenizer(in.readLine());
    gcdSet[0] = Integer.parseInt(st.nextToken());

    for (int i = 1; i < N; i++) {
      gcdSet[i] = Integer.parseInt(st.nextToken());
      if (!(gcdSet[i] % gcdSet[0] == 0)) {
        System.out.println(-1);
        return;
      }
    }

    System.out.println(2 * N);
    for (int i = 0; i < N; i++) {
      System.out.print(gcdSet[i] + " " + gcdSet[0] + " ");
    }

    in.close();
  }
}


import java.util.Arrays;
import java.util.Scanner;

public class MarcoAndGCD {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		sc.nextLine();
		int[] set = Arrays.stream(sc.nextLine().split(" ")).mapToInt(x -> Integer.parseInt(x)).toArray();
		sc.close();
		for (int i = 0; i < set.length; i++) {
			if(set[i]%set[0]!=0) {
				System.out.println(-1);
				return;
			}
		}
		System.out.println(set.length*2);
		for (int i = 0; i < set.length; i++) {
			System.out.print(set[i] + " " + set[0] + " ");
		}
		System.out.println();
	}

}


import java.util.Arrays;
import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;

import javax.swing.plaf.FontUIResource;

public class MarcoAndGCD {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		sc.nextLine();
		int[] set = Arrays.stream(sc.nextLine().split(" ")).mapToInt(x -> Integer.parseInt(x)).toArray();
		sc.close();
		Set<Integer> result = new HashSet<Integer>();
		Set<Integer> seen = new HashSet<Integer>();
		for (int i = set.length-1; i >=0; i--) {
			if(!seen.contains(set[i])) {
				result.add(set[i]);
				seen.add(set[i]);
				for (int j = i+1; j < set.length; j++) {
					int gcd = gcd(set[i],set[j]);
					int locationOfGCD = Arrays.binarySearch(set, gcd);
					if(locationOfGCD<0){
						System.out.println(-1);
						return;
					}else {
						seen.add(gcd);
					}
				}
			}
		}
		System.out.println(result.size());
		for (int i : result) {
			System.out.print(i+" ");
		}
	}
	public static int gcd(int i, int j) {
		if(i%j==0) {
			return j;
		}else if(j%i==0){
			return i;
		}else if(i>j) {
			return gcd(i%j,j);
		}else {//j>i
			return gcd(i,j%i);
		}
	}
}


import java.util.Arrays;
import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;

public class MarcoAndGCD {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		sc.nextLine();
		int[] set = Arrays.stream(sc.nextLine().split(" ")).mapToInt(x -> Integer.parseInt(x)).toArray();
		sc.close();
		Set<Integer> result = new HashSet<Integer>();
		Set<Integer> seen = new HashSet<Integer>();
		for (int i = set.length-1; i >=0; i--) {
			if(!seen.contains(set[i])) {
				result.add(set[i]);
				seen.add(set[i]);
				for (int j = i+1; j < set.length; j++) {
					int gcd = gcd(set[i],set[j]);
					int locationOfGCD = Arrays.binarySearch(set, gcd);
					if(locationOfGCD<0){
						System.out.println(-1);
						return;
					}else {
						seen.add(gcd);
					}
				}
			}else {
				for (int j = i+1; j < set.length; j++) {
					int gcd = gcd(set[i],set[j]);
					int locationOfGCD = Arrays.binarySearch(set, gcd);
					if(locationOfGCD<0){
						System.out.println(-1);
						return;
					}else {
						seen.add(gcd);
					}
				}
			}
		}
		System.out.println(result.size());
		for (int i : result) {
			System.out.print(i+" ");
		}
	}
	public static int gcd(int i, int j) {
		if(i%j==0) {
			return j;
		}else if(j%i==0){
			return i;
		}else if(i>j) {
			return gcd(i%j,j);
		}else {//j>i
			return gcd(i,j%i);
		}
	}
}


import java.util.Arrays;
import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;

public class MarcoAndGCD {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		sc.nextLine();
		int[] set = Arrays.stream(sc.nextLine().split(" ")).mapToInt(x -> Integer.parseInt(x)).toArray();
		sc.close();
		for (int i = 0; i < set.length; i++) {
			System.out.print(set[i] + " " + set[0] + " ");
		}
		System.out.println();
	}

}


import java.util.Arrays;
import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;

public class MarcoAndGCD {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		sc.nextLine();
		int[] set = Arrays.stream(sc.nextLine().split(" ")).mapToInt(x -> Integer.parseInt(x)).toArray();
		sc.close();
		for (int i = 0; i < set.length; i++) {
			System.out.print(set[i] + " " + set[0] + " ");
		}
	}

}


import java.util.Arrays;
import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;

public class MarcoAndGCD {
	private static Set<Integer> result = new HashSet<Integer>();
	private static Set<Integer> seen = new HashSet<Integer>();
	private static int[] set;
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		sc.nextLine();
		set = Arrays.stream(sc.nextLine().split(" ")).mapToInt(x -> Integer.parseInt(x)).toArray();
		sc.close();

		for (int i = set.length-1; i >=0; i--) {
			if(!seen.contains(set[i])) {
				result.add(set[i]);
				seen.add(set[i]);
				if(checkSet(i)==-1) {
					return;
				}
			}
		}
		System.out.println(result.size());
		for (int i : result) {
			System.out.print(i+" ");
		}
	}
	public static int checkSet(int i) {
		for (int j = i+1; j < set.length; j++) {
			int gcd = gcd(set[i],set[j]);
			int locationOfGCD = Arrays.binarySearch(set, gcd);
			if(locationOfGCD<0){
				System.out.println(-1);
				return -1;
			}else {
				if(!seen.contains(gcd)) {
					seen.add(gcd);
					checkSet(locationOfGCD);
				}
			}
		}
		return 0;
	}
	public static int gcd(int i, int j) {
		if(i%j==0) {
			return j;
		}else if(j%i==0){
			return i;
		}else if(i>j) {
			return gcd(i%j,j);
		}else {//j>i
			return gcd(i,j%i);
		}
	}
}


import java.util.Arrays;
import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;

public class MarcoAndGCD {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		sc.nextLine();
		int[] set = Arrays.stream(sc.nextLine().split(" ")).mapToInt(x -> Integer.parseInt(x)).toArray();
		sc.close();
		System.out.println(set.length*2);
		for (int i = 0; i < set.length; i++) {
			System.out.print(set[i] + " " + set[0] + " ");
		}
		System.out.println();
	}

}


import java.util.Scanner;

public class C {

	public static void main(String[] args) {
		Scanner s=new Scanner(System.in);
		int n=s.nextInt();
		int[] a=new int[n];
		for (int i=0; i<n; i++)
			a[i]=s.nextInt();

		boolean[] contains=new boolean[1000001];
		for (int i:a)
			contains[i]=true;

		for (int i=0; i<n; i++) {
			int gcd=a[i];
			for (int j=i+1; j<n; j++) {
				gcd=gcd(gcd, a[j]);
				if (!contains[gcd]) {
					System.out.println(-1);
					return;
				}
			}
		}
		System.out.println(n);
		for (int i:a)
			System.out.print(i+" ");
	}

	private static int gcd(int a, int b) {
		if (b==0)
			return a;
		return gcd(b, a%b);
	}

}