#include<stdio.h>
int main()
{
    int n,m,i,j,k;
    scanf("%d %d %d",&n,&m,&k);
    if(n<0)
        n=-n;
    if(m<0)
        m=-m;
    i=n+m;
    if(i>k || (k-i)%2==1)
        printf("NO");
    else
        printf("YES");
}

#include<stdio.h>
int main()
{
    int a,b,s,sum,l;
    scanf("%d%d%d",&a,&b,&s);
    if(a<0)
        a=-a;
    if(b<0)
        b=-b;
    sum=a+b;
    l=s-sum;
    if(l<0||l%2!=0)
        printf("No");
    else if(l%2==0)
        printf("Yes");
}

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

int main()
{
    int a, b, s;
    scanf("%d %d %d", &a, &b, &s);

    a = abs(a);
    b = abs(b);
    s = abs(s);

    if(s < (a + b))
        printf("No");
    else if((s - (a + b)) % 2 == 0)
        printf("Yes");
    else
        printf("No");

    return 0;
}

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

int main()
{
    long long int a,b,s,sum;

    scanf("%I64d %I64d %I64d",&a,&b,&s);

    sum=abs(a)+abs(b)-s;

    if(s<abs(a)+abs(b))
        printf("No");
    else if(abs(a)+abs(b)==s)
        printf("Yes");
    else if(sum%2!=0)
        printf("No");
    else
        printf("Yes");

    return 0;
}

#include<stdio.h>
#include<math.h>
int main( )
{
	long long int a,b,s,c,k,l;
	scanf("%lld %lld %lld",&a,&b,&s);
	k=fabs(a);
	l=fabs(b);
	if((fabs(a)+fabs(b))!=0)
	{
		if((s)%(k+l)==0)
		{
			printf("Yes\n");
		}
		else if((s>(k+l))&&((s-(k+l))%2==0))
		{
			printf("Yes\n");
		}
		else
		{
			printf("No\n");
		}
	}
	else
	{
		if(s%2==0)
		{
			printf("Yes\n");
		}
		else
		{
			printf("No\n");
		}
	}

	return 0;
}

#include<stdio.h>
#include<math.h>

int main(){
	long long int x,y,a;

	scanf("%lld %lld %lld",&x,&y,&a);
	if(abs(abs(a)-abs(x)+abs(y)) % 2 || (abs(x)+abs(y) > abs(a))){ puts("No"); return 0; }
	puts("Yes");

	return 0;
}

#include<stdio.h>
int main()
{
    int a,b,c,d,e;
    while(scanf("%d%d%d",&a,&b,&c)==3)
    {
        if(a<0) a *=-1;
        if(b<0) b *=-1;
        d = a+b;
        e = c-d;
        if(e<0) printf("No\n");
        else
        {
            if(e%2==0) printf("Yes\n");
            else printf("No\n");
        }

    }
    return 0;
}

#include<stdio.h>
#include<math.h>
int kt(int a,int b,int c){
	int step=c-(abs(a)+abs(b));
	if(step<0 || step%2==1)
		return 0;
	return 1;
}
int main(){
	int a,b,c;
	scanf("%d%d%d",&a,&b,&c);
	if(kt(a,b,c))
		printf("Yes");
	else
		printf("No");
	return 0;
}

#include<stdio.h>
int main()

{
    long long x,a,b,s;
    scanf("%I64d %I64d %I64d",&a,&b,&s);
    if(a<0)
    {
        a=-a;
    }
    if(b<0)
    {
        b=-b;
    }
    x=a+b;
    x=s-x;
    if(x==0)
    {
        printf("Yes\n");
    }
    else if(x<0)
    {
        printf("No\n");
    }
    else
    {
        if(x%2==0) printf("Yes\n");
        else printf("No\n");
    }

}

#include <stdio.h>

int main(void) {

int a,b,s;
scanf("%d%d%d",&a,&b,&s);
if(a<0)
{
    a=a*-1;

}

if(b<0)
{
    b=b*-1;

}

if(a+b<=s  && (s-(a+b))%2==0 )

{

printf("Yes");

}

else
{

printf("No");

}

    return 0;
}

#include <stdio.h>

int main () {
    int a, b, s;
    scanf("%d %d %d", &a, &b, &s);
    if (a < 0) a = -a;
    if (b < 0) b = -b;
    if ((s-a-b)%2 == 0 && (s-a-b) >= 0)
        printf("Yes\n");
    else
        printf("No\n");
    return 0;
}

#include<stdio.h>
#include<string.h>
int main(){
	long int x;
	long int t;
	long int z;
	//long long int s=0;
	scanf("%lld",&x);
	scanf("%lld",&t);
	scanf("%lld",&z);
	if(x<0)
		x=x*-1;
	if(t<0)
		t=t*-1;
	if(x+t>z){
	printf("NO");
	return 0;
	}
	if((z-(x+t))%2==0){
	printf("YES");
	}
	else
		printf("NO");
return 0;
}

#include<stdio.h>
int main()
{
    long x,y,s,minus;
    while(scanf("%ld %ld %ld",&x, &y, &s)!=EOF)
    {
        if(x<0) x=-1*x;
        if(y<0) y=-1*y;
        minus=s-(x+y);
        if(minus<0)
            printf("No\n");
        else
        {
            if(minus&1)
                printf("No\n");
            else
                printf("Yes\n");
        }

    }
    return 0;
}

#include <stdio.h>
int main()
{
    int n,i,j,a,b,c;
    scanf("%d %d %d",&a,&b,&c);
    if(a<0){
        a=-a;
    }
    if(b<0){
        b=-b;
    }
    if(c<(a+b)){
        printf("NO");
    }
    else if(c==(a+b)){
        printf("YES");
    }
    else if(c==(-a)||c==(-b)){
        printf("NO");
    }
    else{
        if((a+b)%2==0 && c%2==0){
            printf("YES");
        }
        else if((a+b)<0){
            printf("NO");
        }
        else if((a+b)%2!=0 && c%2!=0){
            printf("YES");
        }
        else{
            printf("NO");
        }
    }
    return 0;
}

#include<stdio.h>
#include<stdlib.h>
int main()
{
    long long n,m,k,t,d=1;
    scanf("%lld%lld%lld",&n,&m,&k);
    t=abs(m)+abs(n);
    if(t<k)
        d=k-t;
    if(t==k||d%2==0)
        printf("Yes\n");
    else
        printf("No\n");
    return 0;
}

#include <stdio.h>
int main ()
{
long long int a,b,c;
scanf("%lld%lld%lld",&a,&b,&c);
if ((c>= ((a>0)? a:-a)+((b>0)? b:-b))&&((((a>0)?a:-a)+((b>0)?b:-b)-c)%2==0))
printf("Yes");
else
printf("No");
return 0;
}

#include <stdio.h>

long long aV(long long x)
{
    if (x <= 0)
        return x *= (-1);
    else
        return x;
}
void check(long long a, long long b, long long s)
{
    if (((aV(a) + aV(b)) <= s) && ((aV(a) + aV(b) + s) % 2 == 0))
        printf("Yes");
    else
        printf("No");
}
int main()
{
    long long a, b, s;
    scanf("%lld  %lld  %lld", &a, &b, &s);
    check(a, b, s);
}

#include <stdio.h>
#include <math.h>

int main(){
    long long a,b,s,tong;
    int test = 0 ;
    do {
        scanf("%lld%lld%lld",&a,&b,&s);
    }while (a <-1e9 || a>1e9 || b<-1e9 || b>1e9 || s<1 || s>2*1e9);
       tong =abs(a)+abs(b);
    if (s>=tong){
        if (s%2 == 0 && tong %2 ==0){
            test  =1;
    	}
        else if (s%2 !=0 && tong%2 != 0) {
            test =1;
    	}
    }
    if (test == 1) printf("Yes");
    else printf ("No");
    return 0;
}

#include<stdio.h>
#include<string.h>
int main()
{
    long long a,b,s,sum;
    scanf("%lld %lld %lld", &a,&b,&s);
    if(a<0 && b < 0)
    {
        sum = -a + -b;
    }
    else if(a<0 && b >=0)
    {
        sum = b-a;
    }
    else if(a>=0 && b <0)
    {
        sum = a-b;
    }
    else
    {
        sum = a + b;
    }
    if(sum < s && (s-sum) % 2 != 0)
    {
        printf("No\n");
    }
    else if(sum>s)
    {
        printf("No\n");
    }
    else
    {
        printf("Yes\n");
    }
    return 0;
}

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

int main(void){
     int d;
     int a,b,c;
    scanf("%d ",&a);
    scanf("%d ",&b);
    scanf("%d ",&c);

    if((a>0 && b>0) || (a<0 && b<0)){
        d= abs(a+b);
    }
    else{
        d=abs(a-b);
    }
    if((c-d)%2==0 && c>=d){
        printf("Yes");
    }
    else{
        printf("No");
    }

}

#include<stdio.h>
int main()
{
    int a,b,k,d;
    scanf("%d %d %d",&a,&b,&k);
    d=abs(a)+abs(b);
    if(d==k){
        printf("Yes");
    }
    else if(k>d && (k-d)%2==0){
        printf("Yes");
    }
    else printf("No");

 return 0;
 }

#include<stdio.h>
#include<math.h>
int main(){
	int a,b,n;
	scanf("%d%d%d",&a,&b,&n);
	a=abs(a);
	b=abs(b);
	if((a+b<n)&&a==0&&b==0&&n%2==0){
		printf("Yes");
		return 0;
	}
	else if(a+b==n){
		printf("Yes");
	}
	else if(a+b<n){
		if((n-a-b)%2==0){
			printf("Yes");
		}
		else printf("No");
	}
	else if(n%(a+b)==0){
		printf("Yes");
	}
	else printf("No");
}

#include <stdio.h>
int main()
{
    int a,b,n;
    scanf("%d%d%d",&a,&b,&n);
    if(a<0) a=a*-1;
    if(b<0) b=b*-1;
    if(a+b>n||(n-a-b)%2==1) printf("No");
    else printf("Yes");
    return 0;
}

#include<stdio.h>
#include<stdlib.h>
int main(){
    int z;
    int a,b;
    int c;
    scanf("%d%d%d", &a, &b, &c);
    a = abs(a);
    b = abs(b);
    z = a+b;
    if(c < z){
        printf("No");
        return 0;
    }
    if(c == z){
        printf("Yes");
        return 0;
    }
    if((z%2 == 0) ^ (c%2 == 0)){
        printf("No");
    }
    else{
        printf("Yes");
    }
    return 0;
}

#include "stdio.h"
#include "stdlib.h"

int main(int argc, char* argv[])
{
    int a, b, s;
    scanf("%d %d %d",&a,&b,&s);
    a=abs(a);b=abs(b);

    if ((a+b>s) || ((s-a+b) % 2!=0)) {printf("NO");} else {printf("YES");}
    scanf("%d %d %d",&a,&b,&s);
    return 0;
}

#include<stdio.h>
int main()
{
    int a,b,s;
    scanf("%d%d%d",&a,&b,&s);
    if(a<0)
    a=-a;
    if(b<0)
    b=-b;

    if(a-s+b<=0&&(s-a-b)%2==0)
        printf("Yes");
        else
        printf("No");
    return 0;
}

#include<stdio.h>

int main()
{
    long long a,b,s;
    scanf("%lld%lld%lld",&a,&b,&s);
    if (a < 0) a = -a;
    if (b < 0) b = -b;
    if(a+b>s)
      printf("No\n");
    else if((a+b-s)%2)
      printf("No\n");
    else
      printf("Yes\n");
         return 0;
}

#include <stdio.h>

int main()
{
	int a,b,s,r,e,w,q;
	scanf("%d %d %d",&a,&b,&s);
	r=abs(a);
	e=abs(b);
	w=r+e;

	q=s-w;

	if (q%2==0 && q>=0){
		printf("Yes");
	}
	else{
		printf("No");
	}

	return 0;
}

#include<stdio.h>
int main()
{
    long long int a,b,s;
    scanf("%I64d%I64d%I64d",&a,&b,&s);
    if(a<0)
    {
        a=a*(-1);
    }
    if(b<0)
    {
        b=b*(-1);
    }
    if(a+b==s)
    printf("YES");
    else if(a+b>s)
    printf("NO");
    else
    {
        if((a+b)%2==0 && s%2==0)
        printf("YES");
        else if((a+b)%2==1 && s%2==1)
        printf("YES");
        else
        printf("NO");
    }
    return 0;
}

#include <stdio.h>
#include <stdlib.h>
#include<math.h>
int main()
{
    long long int a,b,c;
    scanf("%lli %lli %lli",&a,&b,&c);
    if((c-abs(a)-abs(b))>=0&&(c-abs(a)-abs(b))%2==0){
        printf("YES");
    }
    else{
        printf("NO");
    }
    return 0;
}

#include <stdio.h>
int main()
{
    long long int x,y,a;
    scanf("%I64d%I64d%I64d",&x,&y,&a);
    a = a-abs(x)-abs(y);
    if( a<0 )printf("No\n");
    else if(a==0 || a%2 == 0) printf("Yes\n");
    else printf("No\n");

}

#include<stdio.h>
#include<math.h>

int main(){
	long long a,b,s;
	scanf("%lld%lld%lld",&a,&b,&s);
	int x=abs(a)+abs(b);
	if(s<x)
	printf("No");
	else if((s-x)%2==0)
	printf("Yes");
	else
	printf("No");
	return 0;
}

#include<stdio.h>
#include<string.h>
#include<math.h>

int main()
{
    int a, b, s, d;
    scanf("%d %d %d", &a, &b, &s);
    d = abs(a) + abs(b);
    if (d > s || ((d-s)%2))
    {
        printf("No\n");
    }
    else
    {
        printf("Yes\n");
    }
    return 0;
}

#include<stdio.h>
int main()
{
    long int a,b,s;
    scanf("%ld%ld%ld",&a,&b,&s);
    if(a<0)
        a=-a;
    if(b<0)
        b=-b;
    if((a+b)>s)
    printf("No\n");
    else
    {
        //s-=(a+b);
        if(s%2==(a+b)%2)
            printf("Yes\n");
        else
            printf("No\n");
    }
    return 0;
}

#include <stdio.h>
#include <math.h>

int main()
{
    int a,b,s;
    scanf("%d %d %d",&a,&b,&s);

    int ans=0;

    ans=(s-(abs(a)+abs(b)))%2;

    if(ans==0 && s>=(abs(a)+abs(b)))
    {
        printf("YES");
    }
    else if(ans==1 || s<(abs(a)+abs(b)))
    {
        printf("NO");
    }

    return 0;
}

#include<stdio.h>
#include<math.h>
int main()
{
	int a, b, s;
	scanf("%d %d %d", &a, &b, &s);
	a = abs(a), b = abs(b);
	if (a + b > s) printf("NO");
	else if (a + b == s) printf("YES");
	else
	{
		if ((s-a-b) % 2 == 0)printf("YES");
		else printf("NO");
	}
}

#include<stdio.h>
#include<stdlib.h>
int main()
{
    long long int i,j,a,b,sum;
    scanf("%lld %lld %lld",&a,&b,&j);

    i=j-abs(a)+abs(b);

    if(j<(abs(a)+abs(b)) )
    printf("No");
    else
    {

    if(i%2==0)
    printf("Yes");
    else
    printf("No");
    }

    return 0;
}

#include<stdio.h>

int main()
{
	long long int a,b,s;
	scanf("%lld %lld %lld",&a,&b,&s);

	a = a>0 ? a: -a;
	b= b>0 ? b : -b;
	if((s-a-b)%2==0 && (s-a-b) >= 0)
		printf("Yes\n");
	else
		printf("No\n");
	return 0;
}

#include<stdio.h>
#include<stdlib.h>
int main()
{
long int a,b,s;
scanf("%li%li%li",&a,&b,&s);
a=abs(a);
b=abs(b);
if(a==0 && b==0 && s%2==0)
printf("Yes");
else if(a+b==s)
printf("Yes");
else if((s-a-b)>0 && (s-a-b)%2==0)
printf("Yes");
else
printf("No");
}

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main()

{
    long long a,b,s,r;
    scanf("%I64d %I64d %I64d",&a,&b,&s);
    if(a<0){a=-a;}
     if(b<0){b=-b;}
    r=a+b;

    if(s>=r)
    {
        if(r%2==0)
        {
            if(s%2==0){printf("Yes");}
            else{printf("No");}
        }
         if(r%2!=0)
        {
            if(s%2!=0){printf("Yes");}
            else{printf("No");}
        }

    }
     if(s<r){printf("No");}

}

#include<stdio.h>
#include<math.h>
// 515A
int main(){
  int a, b, s;
  scanf("%d%d%d", &a, &b, &s);

  if(s < abs(a) + abs(b) ){
    printf("No");
  }
  else if((s - abs(a) - abs(b)) % 2 == 0 || s == abs(a) + abs(b))  printf("Yes");
  else printf("No");
	return 0;
}

#include<stdio.h>
#include<stdlib.h>
int main()
{
    long long int x,y,s;
    scanf("%lld%lld%lld",&x,&y,&s);
    if(abs(x)+abs(y)>s)
    {
        printf("No\n");
    }
    else
    {
        if(x+y==s)
        {
            printf("Yes\n");
        }
        else if((s-(x+y))%2==0)
        {
            printf("Yes\n");
        }
        else
        {
            printf("No\n");
        }
    }
}

#include<stdio.h>
int main()
{
	long long int a,b,s;
	scanf("%I64d%I64d%I64d",&a,&b,&s);
	if (a < 0)
		a = a*-1;
	if (b < 0)
		b = b*-1;
	s = s - (a + b);
	if (s % 2 == 0 && s>=0)
		printf("Yes\n");
	else
		printf("No\n");

	return 0;
}

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

int main(int argc, char *argv[])
{
    long long int s;
    int a,b;

    scanf("%d %d %lld", &a, &b, &s);

    if(a<0) a=-a;
    if(b<0) b=-b;

    if(s<(a+b)) printf("No\n");
    else if((s%2) != (a+b)%2) printf("No\n");
    else printf("Yes\n");

    return 0;
}

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

int main()
{
    long n, x, y;
    scanf("%d %d %d", &x, &y, &n);
    n=n-(abs(x)+abs(y));
    if(n%2==0 && n>=0)
        printf("YES");
    else
        printf("NO");
}

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

int main(){
	long int a = 0, b = 0, s = 0;

	scanf("%ld %ld %ld", &a, &b, &s);

	if (abs(a) + abs(b) <= s && (a + b - s) % 2 == 0){

	printf("Yes");

	}
	else printf("No");

	return 0;

}

#include<stdio.h>
#include<math.h>
int main(){
	long long int a, b, s, aabs, babs;
	scanf("%llu%llu%llu", &a, &b, &s);
        aabs = llabs(a); babs = llabs(b);

	if(a == 0 && b == 0){
		if(s % 2 == 0)	printf("YES\n");
			else	printf("NO\n");
	}
		else{
			if(aabs + babs == s)	printf("YES\n");
				else	if((aabs + babs) < s && (s - (aabs + babs)) % 2 == 0)	printf("YES\n");
					else	printf("NO\n");
		}
	return 0;
}

#include<stdio.h>
int main()
{
    long long int a,b,c;
    scanf("%lld%lld%lld",&a,&b,&c);
    if(a<0)
        a*=-1;
    if(b<0)
        b*=-1;
    if(c<0)
        c*=-1;
    if(a+b==c||(c-a+b)%2==0&&a+b<c)
        printf("YES\n");
    else
        printf("NO\n");
    return 0;
}

#include<stdio.h>
int main()
{
    long long int a,b,s;
    scanf("%lld%lld%lld",&a,&b,&s);
    if(abs(abs(a)+abs(b))<=s && abs(abs(abs(a)+abs(b))-s)%2==0)printf("YES");
    else printf("NO");
    return 0;
}

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

int main(){

int a,b,s;

scanf("%d %d %d",&a,&b,&s);

if (abs(a)+abs(b)>s)
printf("No");

else{
 if((a+b-s)%2==0)
      printf("Yes");
    else
    printf("No");
}

return 0;
}

#include <stdio.h>

int main(void) {
long long int a,b,s;
scanf("%lld %lld %lld",&a,&b,&s);
if(a<0)
a=-a;
if(b<0)
b=-b;
a=s-a-b;
if((a>=0)&&(a%2==0)){
	printf("YES");
	return 0;
}else{printf("NO");
	return 0;
}}

#include<stdio.h>
#include<math.h>
int main(){
	long long a,b,s;
	scanf("%lld%lld%lld", &a,&b,&s);
	long long n=abs(a)+abs(b);
	long long m=s-n;
	if(s<0){
		printf("invalid input");
	}
	else if(s<n){
		printf("No");
	}
	else if(m%2!=0){
		printf("No");
	}
	else if(m%2==0){
		printf("Yes");
	}

   return 0;
}

#include<stdio.h>
#include<math.h>

int main()
{
    int a,b,c,x;
    scanf("%d%d%d",&a,&b,&c);
    a=abs(a);
    b=abs(b);
    x=c-(a+b);
    if((c-(a+b)>1&&x%2==0)||a+b==c)
        printf("YES");
    else
        printf("NO");
    return 0;
}

#include <stdio.h>
int main ()
{
	int a,b,s;
	scanf("%d %d %d",&a,&b,&s);
	if (a<0)
		a=0-a;
	if (b<0)
		b=0-b;

	if (a+b>s)
		printf("No\n");
	else if (a+b==s)
		printf("Yes\n");
	else if ((s-(a+b))%2==0)
		printf("Yes\n");
	else if ((s-(a+b))%2==1 || (s-(a+b))%2==-1)
		printf("No\n");
	return 0;
	//
}

#include<stdio.h>
int main()
{
    long long a,b,s,x,y;
    scanf("%I64d %I64d %I64d",&a,&b,&s);
    if(a<0)
        a=0-a;
    if(b<0)
        b=0-b;

    x=a+b;
    if(s<x)
        printf("No");
    else
    {
        s=s-x;
        if(s%2==0)
            printf("Yes");
        else
            printf("No");
    }
    return 0;
}

#include<stdio.h>
#include<math.h>
	int main (){
		long long  x ,a , b , s;
		scanf("%lld%lld%lld", &a , &b , &s);
		x= abs(a)+abs(b);
		if( s<x ){
			printf("No");
		}
		else if(s>=x){
			if((s-x)%2==0){
				printf("Yes");
			}
			else if((s-x)%2!=0){
				printf("No");
			}

		}
	}

#include<stdio.h>
int main()
{
    int a,b,s,n;
    scanf("%d %d %d",&a,&b,&s);
    if(a==0&&b==0)
    {
        if(s%2==0)
            printf("YES\n");
        else
            printf("NO\n");
    }
    else
    {
        if(a<0)
            a=-a;
        if(b<0)
            b=-b;
        if((s-a-b)<0)
            printf("NO\n");
        else
        {
            n=s-a-b;
            if(n%2==0)
                printf("YES\n");
            else
                printf("NO\n");
        }
    }
    return 0;
}

#include <stdio.h>
int main()
{
	long long sum, x, y, n;
	scanf("%I64d%I64d%I64d", &x, &y, &n);
	sum=(x>0?x:-x)+(y>0?y:-y);
	if(n<sum)
	{
		printf("No\n");
	}
	else if(n>=sum)
	{
		if(n%2==0)
		{
			//printf("=0");
			if(sum%2==0)
			{
				//printf("sum=%d\n", sum);
				printf("Yes\n");
			}
			else
			{
				printf("No\n");
			}
		}
		else
		{
			if(n%2!=0)
			{
				if(sum%2!=0)
				{
					printf("Yes\n");
				}
				else
				{
					printf("No\n");
				}
			}
		}
	}

	return 0;
}

#include<stdio.h>
int main()
{
    long long int a,b,s;
    scanf("%lld %lld %lld",&a,&b,&s);
    if(a<0)
    {
        a=-a;
    }
    if(b<0)
    {
        b=-b;
    }
    // printf("%lld",a);
    if(s>=a+b)
    {
        if((a+b-s)%2==0)
        {
        printf("Yes");
        }
        else
        {
        printf("No");
        }
    }
    else
    {
        printf("No");
    }

}

#include<stdio.h>
#include<math.h>
int main()
{
    int a,b,s,sum,sum1,sum2;
    scanf("%d %d %d",&a,&b,&s);
    sum2=abs(a)+abs(b);
    if(sum2<=s&&((s-sum2)%2==0))
    {
        printf("Yes");
    }
    else
    {
        printf("No");
    }
    return 0;
}

#include<stdio.h>

int main()
{
    long long a, b, s;
    scanf("%lld%lld%lld",&a,&b,&s);
    if(a<0)
    a=-a;
    if(b<0)
    b=-b;
    if(s<a+b)
    printf("%s","NO");
    else
    {
    if((s-(a+b))%2==0)
    printf("%s","YES");
    else
    printf("%s","NO");
    }
    return 0;
}

#include<stdio.h>
int main(){
	int a,b,s;
	scanf("%d%d%d",&a,&b,&s);
	if (a < 0)
		a = -a;
	if (b < 0)
		b = -b;
	if (s >= (a + b) && ((s - (a + b)) % 2) == 0)
		printf("Yes");
	else printf("No");
	return 0;
}

#include<stdio.h>
int main()
{
    long long a,s,b,sum;
    scanf("%I64d %I64d %I64d",&a,&b,&s);
    sum=abs(a)+abs(b);
    if(b==0&&a==0&&s%2==0) printf("Yes");
    else if(sum>s) printf("No");
    else if(sum%2!=0&&s%2!=0) printf("Yes");
    else if(sum%2==0&&s%2==0) printf("Yes");
    else printf("No");
}

#include<stdio.h>
int main(){
    long long int a,b,s,e;
    scanf("%lld%lld%lld",&a,&b,&s);
    a*=(a<0?-1:1);
    b*=(b<0?-1:1);
    e=s-a-b;
    if(e>=0&&e%2==0)
        printf("Yes");
    else
        printf("No");
    return 0;}

#include <stdio.h>
#include <math.h>

int main(){
    long long int a,b,s,d;
    while (scanf("%I64d %I64d %I64d",&a,&b,&s)==3){
        a=fabs(a);
        b=fabs(b);
        d=s-(a+b);
        if ((a+b)==s){
            printf ("Yes\n");
        }
        else if (d>0&&d%2==0){
            printf ("Yes\n");
        }
        else if (a==0&&b==0){
            if (s%2==0){
                printf ("Yes\n");
            }
            else {
                printf ("No\n");
            }
        }
        else {
            printf ("No\n");
        }
    }
    return 0;
}

#include<stdio.h>

int main()
{
    int a, b, s;
    scanf("%d%d%d", &a, &b, &s);
    if(a<0 && b>=0)
    {
        a = -1*a;
    }
    else if(a<0 && b<0)
    {
        a = -1 * a;
        b = -1*b;
    }
    else if(a>=0 && b<0)
    {
        b = b*-1;
    }
    if(a+b<=s)
    {
        if((a+b-s)%2==0)
            printf("Yes");
        else
            printf("No");
    }
    else if(a+b>s)
    {
        printf("No");
    }
    return 0;

}

#include<stdio.h>

int absolute(int a){
        if(a>0)
                return a;
        else
                return -a;
}

int main(){
        int a,b,s;
        scanf("%d %d %d", &a,&b,&s);
        int sum = absolute(a)+absolute(b);
        if( s >= sum && (s - sum) %2 == 0)
                printf("Yes");
        else
                printf("No");
        return 0;
}

#include<stdio.h>
#include<math.h>
int main()
{
  int a,b,s,i=0,flag=0;
  scanf("%d %d %d",&a,&b,&s);
  if(s<(abs(a)+abs(b)))  {printf("NO"); return 0;}
  else
     /*{while(i<=s-(a+b))
     {
      if(s==(abs(a)+abs(b))+2*i)
      {
        flag=1;
        break;
      }
      else
        flag=0;
      i++;
     }}*/
  if((s-abs(a)-abs(b))%2==0)  printf("YES");
  else printf("NO");

   return 0;
}

#include<stdio.h>
#include<math.h>
int main()
{
	int a,b,s,r;
	scanf("%d %d %d",&a,&b,&s);
	if(s>=abs(a)+abs(b))
	{
	r=(s-(abs(a)+abs(b)))%2;
	if(r==0)
	printf("Yes");
	else
	printf("No");
}
else
printf("No");
	return 0;
}

#include<stdio.h>
#include<math.h>

int main(){
    long long int a,b,s;
    scanf("%lld %lld %lld",&a,&b,&s);
    if(s>=abs(a)+abs(b) && (s-(abs(a)+abs(b)))%2==0)    puts("Yes");
    else    puts("No");
    return 0;
}

#include<stdio.h>
#include<math.h>
int main(void)
{
	int a,b,s;
	scanf("%d %d %d",&a,&b,&s);
	if((s-(abs(a)+abs(b)))%2==0&&s>=(abs(a)+abs(b)))
		printf("yes");
	else
		printf("no");
	return 0;
}

#include <stdio.h>
typedef long long int intt64;
int main()
{
    intt64 a,b,c;
    scanf("%lld %lld %lld",&a,&b,&c);
    intt64 sum=0;
    if (a<0)
    {
        a*=-1;
    }
    if (b<0)
    {
        b*=-1;
    }
    sum+=a+b;
    if (c<sum)
    {
        printf("No");
        return 0;
    }
    if (c>=sum)
    {
        if (c==sum)
        {
            printf("Yes");
            return 0;
        }
        if (sum<c)
        {
            c-=sum;
            if (c%2==0)
            {
                printf("Yes");
                return 0;
            }
            else
            {
                printf("No");
                return 0;
            }
        }
    }
}

long long b,a,s;
long long abs(long long x) {
  return x<0?-x:x;
}
main() {
  scanf("%lld%lld%lld", &a, &b, &s);
  a = abs(a), b = abs(b);
  puts(a+b<=s && ((a^b^s)&1LL) == 0LL?"Yes":"No");
}

#include<stdio.h>

int main()
{
    long a,b,s,x;
    scanf("%li %li %li",&a,&b,&s);
    if (a<0)
    a=(-a);
    if (b<0)
        b=(-b);

    x=s-(a+b);

    if (((x%2)==0)&& (s>=(a+b)))
        printf("Yes");
        else
        printf("No");
    return 0;

}

#include<stdio.h>
int main()
{
	long long int x,y;
	unsigned long long int s;
	scanf("%lld %lld %lld",&x,&y,&s);
	if(x<0)
	{
		x=-1*x;
	}
	if(y<0)
	{
		y=-1*y;
	}
	if(s<(x+y)||((s-x-y)%2)!=0)
	{
		printf("No");
	}
	if(s>=(x+y)&&(s-x-y)%2==0)
	{
		printf("Yes");
	}
	return 0;
}

#include<stdio.h>
int main()
{
	long long int a,b,s;
	scanf("%lld %lld %lld",&a,&b,&s);
	if(a<0)
	{
		a=0-a;
	}
	if(b<0)
	{
		b=0-b;
	}
	if(s==(a+b))
	{
		printf("Yes");
	}
	else if(s>(a+b) && ((s-(a+b))%2==0))
	{
		printf("Yes");
	}
	else
	{
		printf("No");
	}
	return 0;
}

#include<stdio.h>
#include<math.h>
int main()
{
    int a,b,s;
    scanf("%d %d %d", &a,&b,&s);
    a=abs(a);
    b=abs(b);

    if(a+b>s || ((s-a-b)%2==1))
    {
        printf("No\n");
        return 0;
    }
        printf("Yes\n");
    return 0;
}

#include<stdio.h>
#include<math.h>
int main(){
	long long a,b,c;
	scanf("%lld %lld %lld",&a,&b,&c);
	long long l=c-(abs(a)+abs(b));
	long long k=abs(a)+abs(b)+c;
	if (l>=0 && k%2==0) printf("Yes");
	else printf("No");
	return 0;
}

#include<stdio.h>
main()
{
	long int a,b,s;

	scanf("%d %d %d",&a,&b,&s);
	if(a<0) a*=-1;
if(b<0) b*=-1;
	if(a==0 && b==0 && s%2==0)
	printf("Yes");

 	else  if((a+b)<s && (s-(a+b))%2==0)
	printf("Yes");

else if(a+b!=s)
	printf("No");

    else
    printf("Yes");

//printf("%d",(s-(a+b))%2);
	}

//
//  main.c
//  Codeforce
//
//  Created by izmaylav on 4/20/15.
//  Copyright (c) 2015 izmaylav. All rights reserved.
//

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#include <float.h>

int cmpfunc (const void * a, const void * b)
{
   return ( *(int*)a - *(int*)b );
}

int main(int argc, const char * argv[]) {
    char inputString[6000000];

    gets(inputString);

    char *aString = strtok(inputString, " ");
    int a = abs(atoi(aString));

    char *bString = strtok(NULL, " ");
    int b = abs(atoi(bString));

    char *cString = strtok(NULL, " ");
    int c = atoi(cString);
    if ((a + b < c && !((c - (a + b)) % 2)) || (a + b == c)) {
        printf("Yes");
    } else {
        printf("No");
    }

    return 0;
}

#include<stdio.h>
#include<math.h>
int main(){
	long long a,b,c;
	scanf("%lld %lld %lld",&a,&b,&c);
	long long s1=c-(abs(a)+abs(b));
	long long s2=abs(a)+abs(b)+c;
	if (s1>=0 && s2%2==0) printf("Yes");
	else printf("No");
	return 0;
}

#include<stdio.h>
int main()
{
    long x,y,a,b,c,d;
    scanf("%ld %ld %ld",&x,&y,&a);
    if(x>=0 && y>=0)
        b=x+y;
    if(x>0 && y<0)
        b=x+(-1)*y;
    if(x<0 && y>0)
        b=y+(-1)*x;
    if(x<0 && y<0)
        b=(-1)*x+(-1)*y;
    //printf("%d\n",b);
    if(b>a)
        printf("NO\n");
    else  if(b==a)
        printf("YES\n");
    else if(((b-a)%2==0))
        printf("YES\n");
    else
        printf("NO\n");

    return 0;
}

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

int main()
{
    long int a ;
    scanf("%d",&a) ;
    long int b ;
    scanf("%d",&b) ;
    long int s ;
    scanf("%d",&s) ;

    if (a+b>s){
        if ((s-a-b)%2==0){
            printf("YES") ;
        }
        else {
                printf("NO");

        }
    }
    else {
        if ((a+b-s)%2==0){
            printf("YES") ;
        }
        else {
                printf("NO");

        }
    }
    return 0;
}

#include<stdio.h>
#include<stdlib.h>
int main()
{
    long long n,m,k,t,d=1;
    scanf("%lld%lld%lld",&n,&m,&k);
    t=abs(m)+abs(n);
    if(t>k)
        d=t-k;
    if(t==k||d%2==0)
        printf("Yes\n");
    else
        printf("No\n");
    return 0;
}

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

int main(int argc, char *argv[])
{
    long long int s;
    int a,b;

    scanf("%d %d %lld", &a, &b, &s);

    if(!((a+b)%2)){
        if(s>=(a+b) && !(s%2))printf("Yes\n");
        else printf("No\n");
    }

    else{
        if(s>=(a+b) && (s%2)) printf("Yes\n");
        else printf("No\n");
    }

    return 0;
}

#include<stdio.h>
int main()
{
    long long int a,b,c;
    scanf("%lld%lld%lld",&a,&b,&c);
    if(a+b==c||(c-a+b)%2==0||(c%2==0&&a==0&&b==0))
        printf("YES\n");
    else
        printf("NO\n");
    return 0;
}

#include<stdio.h>

int main()
{

int a, b, s;

scanf("%d %d %d", &a, &b, &s);

if(s < a+b)
printf("No");

else
{

if((s - (a+b))%2 == 0)
printf("Yes");

else
printf("No");

}

return 0;

}

#include<stdio.h>
#include<stdlib.h>
int main()
{
	long long int i,j,k,l,m,n,a,b;
	printf("Enter the verda location points, and no.of steps to reach\n");
	scanf("%I64d%I64d%I64d",&a,&b,&n);
	if(a<0) a=a*(-1);
	if(b<0) b=b*(-1);
	if(a+b<=n&&(n-(a+b))%2==0) printf("YES");
	else printf("NO");
	return 0;
}

#include<stdio.h>

int main(){
    int a, b, s;

    scanf("%d %d %d", &a, &b, &s);

    if(((s-(a+b))%2) == 0) printf("YES\n");
    else printf("NO\n");

    return 0;
}

#include <stdio.h>
int main ()
{
long long int a,b,c;
scanf("%lld%lld%lld",&a,&b,&c);
if ((c>= a+b)&&((a+b-c)%2==0))
printf("Yes");
else
printf("No");
return 0;
}

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

int main()
{
    long int a ;
    scanf("%d",&a) ;
    long int b ;
    scanf("%d",&b) ;
    long int s ;
    scanf("%d",&s) ;
    if (a+b<s){
        printf("NO");
    }
    else {
        if ((s-a-b)%2==0){
            printf("YES") ;
        }
        else {
                printf("NO");

        }
    }
    return 0;
}

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

int main()
{
    long int a;
    long int b;
    long int s;
    long int x;
    scanf("%d",&a);
    scanf("%d",&b);
    scanf("%d",&s);
    x=abs(a)+abs(b);
    if ((x==s)||((x==0)&&(s==2))||((x==0)&&(s==0)))
    {
        printf("Yes");
    }
    else
    {
        printf("No");
    }
    return 0;
}

#include <stdio.h>
#include <stdlib.h>
int main()
{
	int a,b,s;
	scanf("%d%d%d",&a,&b,&s);
	int x=a+b;
	int d=s-x;
	if(d>=0 && (d==0 || d%2==0))
		printf("YES\n");
	else
		printf("NO\n");
	return 0;
}

#include <stdio.h>

int main()
{
 	int a, b, s;
	scanf ("%d %d %d", &a, &b, &s);
	int t=s-a-b;
	if (t%2==0 && t>0) printf ("Yes");
	else printf ("No");
	return 0;
}

// code by nhuquynh.

#include<stdio.h>
int main()
{
    int a,b,s,c;
    scanf("%d%d%d",&a,&b,&s);

    c=s-(a+b);

    if((a+b)>s)printf("No\n");
    else if(c%2!=0)printf("No\n");
    else printf("Yes\n");

    return 0;
}

#include<stdio.h>
int main()
{
    int x,y,s;
    scanf("%d%d%d",&x,&y,&s);
    if(x+y<=s)
    {if((x+y)%2==s%2)
        printf("Yes");
    else
        printf("No");}
    else
        printf("No");
    return 0;
}

#include<stdio.h>
#include<stdlib.h>
int main()
{
    long long int a,b,s;
    scanf("%lld %lld %lld",&a,&b,&s);
    long long int sum,i;
    sum=abs(b)+abs(a);
    if(s>=sum&&(a!=0||b!=0))
    {
    for(;s>=sum;s=s-sum)
    {
    }
    }
    if((s%2)==0)
    printf("Yes");
    else
    printf("No");
}

#include<stdio.h>
int main(){
	int a,b,s;
	scanf("%d %d",&a,&b,&s);
	if (a+b>=s && (a+b+s)%2==0) printf("YES");
	else printf("NO");
}

#include<stdio.h>

int main()
{
    long long a,b,s;
    scanf("%lld",&a);
    scanf("%lld",&b);
    scanf("%lld",&s);
    if(a==0 && b==0 && s==2)
       printf("Yes\n");
    else if(a+b==s)
         printf("Yes\n");
         else
         printf("No\n");
         return 0;
}

#include<stdio.h>
int main()
{
    long long int a,b,s,c;
    scanf("%lld %lld %lld",&a,&b,&s);
    if(a==0&&b==0)
    {
        if(s%2==0)
        printf("Yes");
        else
        printf("No");
    }
    else if(a==b)
    {
        if(a<0) a=a*-1;
        if(2*a<=s)
        printf("Yes");
        else printf("No");
    }
    else if(a>b)
    {
        if(2*b+a-b<0) c=(2*b+a-b)*-1;
        else c=2*b+a-b;
        if(c<=s)
        printf("Yes");
        else printf("No");
    }
    else if(a<b)
    {
        if(2*a+b-a<0) c=(2*a+b-a)*-1;
        else c=2*a+b-a;
        if(c<=s)
        printf("Yes");
        else printf("No");
    }
}

#include<stdio.h>

int main()
{
	int a,b,s;
	scanf("%d %d %d",&a,&b,&s);

	if((s-a-b)%2==0)
		printf("YES\n");
	else
		printf("NO\n");
	return 0;
}

#include<stdio.h>
#include<math.h>
int main(){
	long long a,b,s;
	scanf("%lld%lld%lld", &a,&b,&s);
	 a=abs(a);
	 b=abs(b);
	 if(a+b>=s && (s-a-b)%2==0){
	 	printf("Yes");
	 }
	 else printf("No");
    return 0;
}

#include<stdio.h>
int main()

{
    long long x,a,b,s;
    scanf("%I64d %I64d %I64d",&a,&b,&s);
    x=a+b;
    x=s-x;
    if(x==0)
    {
        printf("Yes\n");
    }
    else if(x<0)
    {
        printf("No\n");
    }
    else
    {
        if(x%2==0) printf("Yes\n");
        else printf("No\n");
    }

}

#include<stdio.h>
#include<math.h>

int main(){
	int a,b,s;
	scanf("%d%d%d",&a,&b,&s);
	if(a==0&&b==0){
		if(s%2==0) printf("Yes");
		else printf("No");
	}else if(a==0&&b!=0){
		if(s==abs(b)) printf("Yes");
		else printf("No");
	}else if(b==0&&a!=0){
		if(s==abs(a)) printf("Yes");
		else printf("No");
	}else{
		if(s==abs(a)+abs(b)) printf("Yes");
		else printf("No");
	}
	return 0;
}

#include<stdio.h>
int main()
{
    int x,y,s;
    scanf("%d%d%d",&x,&y,&s);
    if(x+y>s)
    {if((x+y)%2==s%2)
        printf("Yes");
    else
        printf("No");}
    else
        printf("No");
    return 0;
}

#include<stdio.h>
int main ()
{
    int a,b,s,i,j,flag=0;
    scanf("%d %d %d",&a,&b,&s);

    if(s<(a+b))
        printf("NO");
    else if((s-a+b)%2==0)
        printf("YES");
    //else if(s>=(a+b))
       // printf("YES");
    else
        printf("NO");

}

#include <stdio.h>
int main ()
{
int a,b,c;
scanf("%d%d%d",&a,&b,&c);
if ((c>= a+b)&&((a+b-c)%2==0))
printf("Yes");
else
printf("No");
return 0;
}

#include <stdio.h>
int main()
{
    long long int x,y,a;
    scanf("%I64d%I64d%I64d",&x,&y,&a);
    if((x==0 && y==0)&& a%2==0)printf("Yes\n");
    else if((x==0 && y==0)&& a%2!=0)printf("No\n");
    else if((abs(x)+abs(y))==a)printf("Yes\n");
    else if((a-(abs(x)+abs(y)))%2 ==0)printf("Yes\n");
    else printf("No\n");

}

#include<stdio.h>
#include<math.h>
int main()
{
    int a,b,s;
    scanf("%d %d %d", &a,&b,&s);
    a=abs(a);
    b=abs(b);

    if(a+b>s || (s-a-b%2==1))
        printf("No");
    else
        printf("Yes");
    return 0;
}

#include <stdio.h>
int main()
{
	long long sum, x, y, n;
	scanf("%I64d%I64d%I64d", &x, &y, &n);
	sum=(x>0?x:-x)+(y>0?y:-x);
	if(n<sum)
	{
		printf("No\n");
	}
	else if(n>=sum)
	{
		if(n%2==0)
		{
			if(sum%2==0)
			{
				printf("Yes\n");
			}
			else
			{
				printf("No\n");
			}
		}
		else
		{
			if(n%2!=0)
			{
				if(sum%2!=0)
				{
					printf("Yes\n");
				}
				else
				{
					printf("No\n");
				}
			}
		}
	}

	return 0;
}

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

int main()

{
    int a,b,s,r;
    scanf("%d %d %d",&a,&b,&s);
    r=a+b;
    if(s>=r)
    {
        if(r%2==0)
        {
            if(s%2==0){printf("Yes");}
            else{printf("No");}
        }
         if(r%2!=0)
        {
            if(s%2!=0){printf("Yes");}
            else{printf("No");}
        }
        if(s<r){printf("No");}
    }
}

#include<stdio.h>
#include<math.h>
	int main (){
		long long  x ,a , b , s;
		scanf("%lld%lld%lld", &a , &b , &s);
		if( s<a+b ){
			printf("No");
		}

		x= abs(a)+abs(b);

		 if((s-x)%2==0){
			printf("Yes");
		}
		else if((s-x)%2 !=0){
			printf("No");
		}
	}

#include <stdio.h>
#include <string.h>
int main(){
	int a,b,s;
	scanf("%d%d%d",&a,&b,&s);
	if(a<0)
		a*=-1;
	if(b<0)
	    b*=-1;
	if((a+b)==0){
		if(s%2==1){
			printf("NO");
		}
		else
		printf("YES");
	}
	else{
	if(a+b>s||(s%2)==1){
		printf("NO");
	}
	else{
		printf("YES");
	}
}
}

#include<stdio.h>

int main()
{
    int a, b, s;
    scanf("%d%d%d", &a, &b, &s);
    if(a<0 && b>0)
    {
        a = -1*a;
    }
    else if(a<0 && b<0)
    {
        a = -1 * a;
        b = -1*b;
    }
    else if(a>0 && b<0)
    {
        b = b*-1;
    }
    if(a+b<=s)
    {
        if((a+b-s)%2==0)
            printf("Yes");
        else
            printf("No");
    }
    else if(a+b>s)
    {
        printf("No");
    }
    return 0;

}

#include<stdio.h>
int main()
{
	long int a,b,s,sum,j=0;
	printf("Enter the x,y coordinate and the value of s :");
	scanf("%ld %ld %ld",&a,&b,&s);
	sum=a+b;
	if(sum%2==0&&s%2==0&&s>=sum)
	{
	printf("YES");
	j=1;
    }
	if(sum%2!=0&&s%2!=0&&s>=sum)
	{
	printf("YES");
	j=1;
    }
	if(j==0)
	printf("NO");
}

#include<stdio.h>

int main()
{
    int a,b,s,r;
    scanf("%d %d %d",&a,&b,&s);
    if(abs(a)+abs(b)==s)
        printf("YES");

     else if(s%2==0 && a==b)
        printf("YES");
    else printf("NO");

    return 0;
}

#include<stdio.h>
int main()
{
    int a,b,s,s1;
    scanf("%d%d%d",&a,&b,&s);
    s1=a+b;
    //printf("%d",s1);
    if((a==0&&b==0&&s%2==0)||s1==s)
        printf("Yes");
    //else if(s1==s)
        //printf("Yes");
    else
        printf("No");
}

#include<stdio.h>
#include<math.h>

int main(){
	int x,y,a;

	scanf("%d %d %d",&x,&y,&a);
	if(abs(a-(x+y)) % 2){ puts("No"); return 0; }
	puts("Yes");

	return 0;
}

#include <stdio.h>
int main()
{
		int a,b,s;
		scanf("%d %d %d",&a,&b,&s);
		if((a+b)>s)
		printf("No");
		else if((a+b)==s)
		printf("Yes");
		else if (s>a+b)
		{ if(0==(s-(a+b))%2)
		printf("Yes");
		else
		printf("No");
		}
		return 0;
}

#include<stdio.h>
int main()

{
    long long x,a,b,s;
    scanf("%I64d %I64d %I64d",&a,&b,&s);
    x=a+b;
    x=s-x;
    if(x==0)
    {
        printf("Yes\n");
    }
    else if(x<0)
    {
        printf("No\n");
    }
    else
    {
        if(x%2==0) printf("Yes\n");
        else printf("No\n");
    }

}

#include<stdio.h>
int main()
{
	long long int a,b,s,i;

	scanf("%lld%lld%lld",&a,&b,&s);
	i=a+b-s;
	if(i%2==0 && i>=0)
		printf("Yes\n");
	else
		printf("No\n");
	return 0;
}

#include <stdio.h>
#include <stdlib.h>
main()
{
    long a=0,b=0,s=0;

    scanf("%ld %ld %ld",&a,&b,&s);
    if(a == 0 && b == 0 && s % 2 == 0)
        printf("Yes");
    else if((abs(a) + abs(b)) < s)
        printf("No");
    else if ((s >= (abs(a) + abs(b))  &&
              (s - (abs(a) + abs(b)))%2 )  )
        printf("Yes");
    else
        printf("No");
}

#include<stdio.h>
int main()
{
    long long a,b,s,sum;
    scanf("%I64d%I64d%I64d",&a,&b,&s);
    sum=abs(a)+abs(b);
    if(a==0&&b==0&&s%2)printf("YES");
    else if(sum>s)printf("NO");
    else if(sum%2!=0&&s%2!=0)printf("YES");
    else if(sum%2==0&&s%2==0)printf("NO");
    else printf("NO");

}

#include<stdio.h>

int main()
{
    int a,b,s,x,y,z;

    scanf("%d %d %d",&a,&b,&s);
    if(s<a+b)
        printf("No\n");
    else if(s==a+b){
        printf("Yes\n");
    }
    else{
        x=abs(a+b);
        if(!(x%2)){
            if(!(s%2))
                printf("Yes\n");
            else
                printf("No\n");
        }
        else{
            if(s%2)
                printf("Yes\n");
            else
                printf("No\n");
        }
    }
    return 0;
}

#include<stdio.h>
int main()
{
    int a,b,s,p;
    scanf("%d %d %d",&a,&b,&s);
    p=s-(a+b);
    if(a+b==s||(p%2==0&&p>0)) printf("Yes");
    else printf("No");
    return 0;
 }

#include<stdio.h>
int main()
{
int a,b,n;
scanf("%d%d%d",&a,&b,&n);
if((a+b-n)%2)
printf("No");
else
printf("Yes");
return 0;
}

#include<stdio.h>
int main()
{
    int n,m,i,j,k;
    scanf("%d %d %d",&n,&m,&k);
    i=n+m;
    if(i<k || (i-k)%2==1)
        printf("NO");
    else
        printf("YES");
}

#include <stdio.h>

int main(void) {

int a,b,s;
scanf("%d%d%d",&a,&b,&s);
if(a<0)
{
    a=a*-1;

}

if(b<0)
{
    b=b*-1;

}

if(s==a+b)

{

printf("Yes");

}

else if(s<a || s<b)
{

printf("No");

}

else if(s>a+b)

{

if(s%2)
{
 printf("No");

    }

    else
    {

        printf("Yes");
    }

}

    return 0;
}

#include<stdio.h>
int main()
{
    int a,b,k;
    scanf("%d %d %d",&a,&b,&k);
    if (a+b<=k && a+b%2==k%2)
    {
        printf("YES\n");
    }else
    printf("NO\n");
    return 0;
}

#include<stdio.h>
int main()
{
    long int a,b,s;
    scanf("%ld%ld%ld",&a,&b,&s);
    if(s<(a+b-2))
    printf("No\n");
    else
    {
        if(s%2!=0)
        {
            if((a+b)%2!=0)
            printf("Yes\n");
            else
            printf("No\n");
        }
        else
        {
            if((a+b)%2==0)
            printf("Yes\n");
            else
            printf("No\n");
        }
    }
    return 0;
}

#include<stdio.h>
int main()
{

    long long int a,b,s;
    scanf("%lld%lld%lld",&a,&b,&s);
    if(a<0)
    a=(0-a);
    if(b<0)
    b=(0-b);
    if((a==0 && b==0 && s==2) || (a+b==s) || ((s-(a+b))%2==0))
    printf("Yes");
    else
    printf("No");
    return 0;
}

#include<stdio.h>
int main()
{
 int a,b,s;
 scanf("%d%d%d",&a,&b,&s);
 if((s>=(a+b))&& (s-(a+b))%2==0)
   printf("Yes\n");
 else
   printf("No\n");
return 0;
}

#include<stdio.h>
#include<stdlib.h>
int main()
{
    long long int i,j,a,b,sum;
    scanf("%d %d %d",&a,&b,&j);

    i=abs(a+b-j);

    if(j<a+b)
    printf("No");
    else
    {

    if(i%2==0)
    printf("Yes");
    else
    printf("No");
    }

    return 0;
}

#include<stdio.h>
#include<math.h>
int main(){
	long long a,b,c;
	scanf("%lld %lld %lld",&a,&b,&c);
	long long l=c-(abs(a)+abs(b)-2);
	long long k=abs(a)+abs(b)+c;
	if (l>=0 && k%2==0) printf("Yes");
	else printf("No");
	return 0;
}

#include<stdio.h>
#include<math.h>
int main()
{
    int a,b,s,x,y;
    scanf("%d%d%d",&a,&b,&s);
    x=abs(s-(a+b));
    y=a+b;
    if((s>=y) && x%2==0)
    {
        printf("YES\n");
    }
    else
    {
        printf("NO\n");
    }
    return 0;
}

#include<stdio.h>
int main()
{
    long long int a,b,s;
    scanf("%lld %lld %lld",&a,&b,&s);
    if(s>=(a+b))
        printf("YES");
    else
        printf("NO");
    return 0;
}

#include <stdio.h>
int main ()
{
long long int a,b,c;
scanf("%lld%lld%lld",&a,&b,&c);
if ((c>= a+b)&&((a+b-c)%2==0))
printf("Yes");
else
printf("No");
return 0;
}

#include <stdio.h>
#include <math.h>
int main(){
	int a,b,s;
	scanf("%d%d%d",&a,&b,&s);
	int c=abs(a)+abs(b);
	if(c>s)
		printf("No");
	else if(c==s) printf("Yes");
	else{
		if(s%2==0)
			printf("Yes");
		else
			printf("No");
	}
}

#include<stdio.h>
int main()

{
    long long a,b,s;
    scanf("%I64d %I64d %I64d",&a,&b,&s);
    if(a+b!=s)
    {
        printf("No\n");
    }
    else if(((a+1)+(b+1))==s)
    {
        printf("Yes\n");
    }
    else if(a-b!=s)
    {
        printf("Yes\n");
    }
    else
    {
        printf("Yes\n");
    }
}

#include<stdio.h>
#include<math.h>
#include<string.h>
int main()
{
    long long int a, b, s, d;
    scanf("%lld %lld %lld", &a, &b, &s);
    d= a+b;
    if(a==0 && b==0){
        if(s%2==0){
            printf("Yes\n");
        }
        else{
            printf("No\n");
        }
    }
    else if(d>=s){
        if(d%2==0){
            printf("Yes\n");
        }
        else{
            printf("No\n");
        }
    }
    else{
        printf("No\n");
    }
    return 0;
}

#include <stdio.h>
#include <math.h>

int main(void) {
    // your code goes here
    long long int x,y;
    long long int s;
    long long int small;
    scanf("%lld %lld %lld",abs(&x),abs(&y),&s);
    //printf("%d %d", x, y);
    small=x+y;
    if(small%2==s%2 && s>=small)
        printf("Yes");
    else
        printf("No");

    return 0;
}

#include <stdio.h>
int main(){
	int a,b,s;
	scanf("%d%d%d",&a,&b,&s);
	int c=a+b;
	if(c>s)
		printf("No");
	else if(c==s) printf("Yes");
	else{
		if(s%2==0)
			printf("Yes");
		else
			printf("No");
	}
}

#include<stdio.h>
int main()
{
    long long int a,b,s;
    scanf("%lld%lld%lld",&a,&b,&s);
    if(abs(a+b)<=s && abs(abs(a+b)-s)%2==0)printf("YES");
    else printf("NO");
    return 0;
}

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

int main()
{
    long int a, b, s, realL;
    scanf("%ld%ld",&a, &b);
    scanf("%ld",&s);

    realL = a+b;
    if(s-realL < 0)
        printf("No\n");
    else{
        if(s-realL == 0)
            printf("Yes\n");
        else{
            if((s-realL)%(s-realL)==0)
                printf("Yes\n");
            else{
                if((s-realL)%2)
                    printf("No\n");
                else
                    printf("Yes\n");
            }
        }
    }
    return 0;
}

#include <stdio.h>
#include <math.h>
int main (){
	int a,b,x;
	scanf("%d%d%d",&a,&b,&x);
	if ((abs(a)+abs(b))==x){
		printf("yes");
	}
	else if ((a==0) && (b==0)){
		printf("yes");
	}
	else {
		printf("no");
	}
	return 0;
}

#include <stdio.h>

int main () {
    int a, b, s;
    scanf("%d %d %d", &a, &b, &s);
    if ((s-a-b)%2 == 0 && (s-a-b) >= 0)
        printf("Yes\n");
    else
        printf("No\n");
    return 0;
}

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <math.h>

int main(int argc, char const *argv[])
{
	long long int a,b,s;
	scanf("%lld %lld %lld",&a,&b,&s);
	s -= a+b;
	if(s < 0)printf("NO");
	else if(s % 2 == 1) printf("NO");
	else printf("YES");
	return 0;
}

#include<stdio.h>
int main(){
	long long a,b,s;
	scanf("%lld%lld%lld",&a,&b,&s);
	if(a==0&&b==0){
		if(s%2!=0) printf("No");
		else printf("Yes");
	}
	else{
		if(s%(a+b)==0) printf("Yes");
		else printf("No");
	}
}

#include<stdio.h>
int main()
{

   int a,b,s,p;
   scanf("%d%d%d",&a,&b,&s);
   if(a<0)
    a=(-a);
   if(b<0)
    b=(-b);
    p=(a+b);
   s=s-(a+b);
   if(s<p || s%2==0)
    printf("No");
   else
    printf("Yes");
    return 0;
}

#include<stdio.h>
#include<math.h>

int main()
{
    int a,b,c;
    scanf("%d%d%d",&a,&b,&c);
    a=abs(a);
    b=abs(b);
    if(c-(a+b)>1||a+b==c)
        printf("YES");
    else
        printf("NO");
    return 0;
}

#include <stdio.h>
#include <math.h>
int main (){
	long long a,b,x;
	scanf("%lld%lld%lld",&a,&b,&x);
	if (((abs(a)+abs(b))==x) && ((x-(abs(a)+abs(b)))%2==0)){
		printf("yes");
	}
	else {
		printf("no");
	}
	return 0;
}

#include<stdio.h>
#include<math.h>
int main( )
{
	long long int a,b,s,c;
	scanf("%lld %lld %lld",&a,&b,&s);
	if((a+b)!=0)
	{
		if((s%(a+b))==0)
		{
			printf("Yes\n");
		}
		else
		{
			printf("No\n");
		}
	}
	else
	{
		printf("Yes\n");
	}

	return 0;
}

#include<stdio.h>

int main(){
    long long int a,b,s;
    scanf("%lld %lld %lld",&a,&b,&s);
    if(s>=a+b && (s-(a+b))%2==0)    puts("Yes");
    else    puts("No");
    return 0;
}

#include<stdio.h>
#include<stdlib.h>
int main()
{
    int a,b,steps;
    scanf("%d%d%d",&a,&b,&steps);
    if(steps < abs(a)+abs(b) || abs(a)+abs(b)+1 == steps)
        printf("No\n");
    else
        printf("Yes\n");
    return 0;
}

#include<stdio.h>
int main()
{
    int n,m,i,j,k;
    scanf("%d %d %d",&n,&m,&k);
    i=n+m;
    if(i>k || (k-i)%2==1)
        printf("NO");
    else
        printf("YES");
}

#include<stdio.h>
#include<math.h>
int main(){
	long long a,b,s;
	scanf("%lld%lld%lld",&a,&b,&s);
	if(a+b>s) printf("No");
	else{
		s=abs(s-(a+b));
		if(s%2==0) printf("Yes");
		else printf("No");
	}
}

#include<stdio.h>
int main()
{
    int a,b,c,s,k;
    scanf("%d%d%d",&a,&b,&s);
    k = abs(a) + abs(b);
    c = k/s;
    if(k==s) {
        printf("Yes");
    }
    else if(a==0 && b==0 && s%2==0)  {
        printf("Yes");
    }
    else if(c%2==0 && s > k &&  s%2==0) {
        printf("Yes");
    }
    else {
        printf("No");
    }
    return 0;
}

#include "stdio.h"
#include "math.h"
int main(){
    int a,b,s;
    scanf("%d %d %d",&a,&b,&s);
    if((s-(abs(a)+abs(b)))%2==0&&(s>=(a)+(b)))
        printf("Yes\n");
    else
        printf("No\n");
    return 0;
}

#include<stdio.h>
int main()
{
    long long int a,b,s,i;
    scanf("%I64d %I64d %I64d",&a,&b,&s);
    if(a<0)a=-a;
    if(b<0)b=-b;
     if(a==0 && b==0){if(s%2==0)printf("Yes");
                      return 0;
                      }
    for(i=a+b;i<=s;i=i+2){
        if(s%i==0){printf("Yes");
                   return 0;
    }
    }
    printf("No");
    return 0;
}

#include<stdio.h>
int main()
{
    long long int a,b,s;
    scanf("%lld %lld %lld",&a,&b,&s);
    if(a<0) a=0;
    if(b<0) b=0;
    if(s>=(a+b))
    {
        if( (s-(a+b))%2==0)
        {
            printf("Yes\n"); return 0;
        }
    }
    printf("No\n");
}

#include<stdio.h>
int main()
{
    long long a,b,s,x,y;
    scanf("%I64d %I64d %I64d",&a,&b,&s);
    if(a<0)
        a=0-a;
    if(b<0)
        b=0-a;

    x=a+b;
    if(s<x)
        printf("No");
    else
    {
        s=s-x;
        if(s%2==0)
            printf("Yes");
        else
            printf("No");
    }
    return 0;
}

#include<stdio.h>
#include<math.h>
int main()
{
    long int a,b,s;
    scanf("%ld%ld%ld",&a,&b,&s);
    if(s<(abs(a+b)-2))
    printf("No\n");
    else
    {
        if(s%2!=0)
        {
            if((abs(a+b))%2!=0)
            printf("Yes\n");
            else
            printf("No\n");
        }
        else
        {
            if((abs(a+b))%2==0)
            printf("Yes\n");
            else
            printf("No\n");
        }
    }
    return 0;
}

#include <stdio.h>

int main()
{
    int a,v,c,d,e,b,sum=0,sum1;

    scanf("%d %d %d",&a,&b,&c);

    if(a<0)
        a=-a;
     if(b<0)
        b=-b;
     sum=a+b;
     sum1=sum-c;
     if(sum1<0)
        sum1=-sum1;

     if(sum==c)
        printf("Yes\n");
     else if(sum1%2==0)
        printf("Yes\n");

      else
        printf("No\n");

    return 0;
}

#include <stdio.h>
int main()
{
    int n,i,j,a,b,c;
    scanf("%d %d %d",&a,&b,&c);
    if(c<(a+b)){
        printf("NO");
    }
    else if(c==(a+b)){
        printf("YES");
    }
    else{
        if((a+b)<0){
            printf("NO");
        }

        else if((a+b)%2==0 && c%2==0){
            printf("YES");
        }

        else if((a+b)%2!=0 && c%2!=0){
            printf("YES");
        }
        else{
            printf("NO");
        }
    }
    return 0;
}

#include<stdio.h>
#include<stdlib.h>
int main()
{
    long long n,m,k,t;
    scanf("%lld%lld%lld",&n,&m,&k);
    t=abs(m-n);
    if(t==k||abs(t-k)==2)
        printf("Yes\n");
    else
        printf("No\n");
    return 0;
}

#include<stdio.h>
#include<math.h>

int main(){
	int x,y,a;

	scanf("%d %d %d",&x,&y,&a);
	if(abs(a-(x+y)) % 2 || ((x+y) > a)){ puts("No"); return 0; }
	puts("Yes");

	return 0;
}

#include <stdio.h>
void isTrue(int a, int b, int s)
{
    int diff = s - (a+b);
    if(diff >= 0 && diff%2==0)
        {
            printf("yes\n");
        }
    else printf("No\n");
}
int main()
{
    int a,b,s;
    scanf("%d %d %d",&a,&b,&s);
    isTrue(a,b,s);
    return 0;
}


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

typedef long long int LLI;

#define TRUE              (1==1)
#define FALSE             (!TRUE)
#define fo3(i,a,b)        for(i=((int)a);i<=((int)b);i++)
#define of3(i,a,b)        for(i=((int)a);i>=((int)b);i--)
#define in1(n)            scanf("%d",&(n))
#define LL1(n)            scanf("%I64d",&(n))
#define in2(n,m)          scanf("%d%d",&(n),&(m))
#define pri(n)            printf("%d\n",n)
#define prs(n)            printf("%s\n",n)
#define prL(n)            printf("%I64d\n",n)
#define strin(n)          scanf("%s",n)
#define newint(n)         (int*)calloc((n),sizeof(int))
#define arrint(ret,n,i)   fo3(i,1,n) in1(ret[i-1])
#define newLLI(n)         (LLI*)calloc((n),sizeof(LLI))
#define arrLLI(ret,n,i)   fo3(i,1,n) LL1(ret[i-1])

void fastWrite(FILE * ofp, int x) {
    int i = 12;
    char buff[i];
    buff[i] = 0;
    int neg = 0;
    if (x < 0){
        x = -x;
        neg = 1;
    }
    if (x == 0)
        buff[--i] = '0';
    else while (x != 0) {
        buff[--i] = (x % 10) + '0';
        x /= 10;
    }
    if (neg)
        buff[--i] = '-';
    fwrite(buff + i, sizeof(char), (12 - i), ofp);
}

void fastSpace(FILE * ofp){
    fwrite(" ", sizeof(char), 1, ofp);
}
void fastNewLine(FILE * ofp) {
    fwrite("\n", sizeof(char), 1, ofp);
}

typedef struct AL AL;
struct AL{
    int * vals;
    int size;
    int cap;
};
AL * ALCreate(int s) {
    AL * ret = (AL *) calloc(1, sizeof(AL));
    if (s == 0) ret->vals = NULL;
    else ret->vals = (int *) calloc(s, sizeof(int));
    ret->size = 0; ret->cap = s;
    return ret;
}
void ALAdd(AL * list, int ele) {
    if (list->cap == list->size) {
        int nC = ((list->cap << 1) | 1);
        list->vals = realloc(list->vals, sizeof(int) * nC);
        list->cap = nC;
    }
    list->vals[list->size++] = ele;
}

typedef struct Pair {
    int fi, se;
} Pair;

int comp(Pair ** arr, int f, int s) {// CHANGE THIS
    if (arr[f]->fi != arr[s]->fi)
        return arr[f]->fi - arr[s]->fi;
    return arr[f]->se - arr[s]->se;
}

void sort(Pair ** arr, int size) {
    int i;
    if (size < 6) {
        int nSize = 0;
        Pair * swp;
        while (size != 0) {
            nSize = 0;
            for (i = 0; i < size - 1; i++)
                if (comp(arr, i, i + 1) > 0) {
                    nSize = i + 1;
                    swp = arr[i];
                    arr[i] = arr[i + 1];
                    arr[i + 1] = swp;
                }
            size = nSize;
        }
        return;
    }
    Pair ** tmp = (Pair **)calloc(size, sizeof(Pair *)); // CHANGE THIS
    int lSize = (size >> 1);
    int rSize = size - lSize;
    sort(arr, lSize); sort(arr + lSize, rSize);
    int lPtr = 0, rPtr = 0;
    int ptr = 0;
    while (ptr != size) {
        if (lPtr == lSize){
            tmp[ptr] = arr[lSize + (rPtr++)];
        } else if (rPtr == rSize || comp(arr, lPtr, lSize + rPtr) <= 0){ // CHANGE THIS
            tmp[ptr] = arr[lPtr++];
        } else {
            tmp[ptr] = arr[lSize + (rPtr++)];
        }
        ptr++;
    }
    for (i = 0; i < size; i++)
        arr[i] = tmp[i];
    free(tmp);
}

int bc(int x) {
    if (x <= 1)
        return x;
    return (x&1) + bc(x>>1);
}

int gcd(int a, int b){return (b==0)?a:gcd(b,a%b);}

#define MAX        100000
#define NULL_CARRY -1
#define NULL_VALUE 0

LLI h1, h2;

int carry[4 * MAX];
int st[4 * MAX];
int en[4 * MAX];
LLI ans[2][4 * MAX];

void init2(int index, int s, int e) {
   //printf("%d %d %d\n", index, s, e);
   st[index] = s;
   en[index] = e;
   ans[0][index] = 0;
   ans[1][index] = 0;
   carry[index] = NULL_CARRY;
   if (s == e)
      return;
   int mid = (s + e) >> 1;
   init2(index << 1, s, mid);
   init2((index << 1) | 1, mid + 1, e);
}

// Inclusive s and e
void ITInit(int s, int e) {
   init2(1, s, e);
}

LLI fastExpo(LLI exp, LLI base, LLI mod) {
    if (exp == 0)
        return 1;
    if (exp == 1)
        return base % mod;
    LLI tmp = fastExpo(exp >> 1, base, mod);
    tmp *= tmp;
    tmp %= mod;
    if (exp & 1)
        tmp = (tmp * base) % mod;
    return tmp;
}

LLI aoMem[2][MAX + 10];
LLI feMem[2][MAX + 10];
void genAllOnes() {
    int i;
    LLI tmp1 = 0;
    LLI tmp2 = 0;
    LLI tmp3 = 1;
    LLI tmp4 = 1;
    fo3(i,0, MAX+9) {
        aoMem[TRUE][i] = tmp1;
        tmp1 = tmp1 * 10 + 1;
        tmp1 %= h1;
        aoMem[FALSE][i] = tmp2;
        tmp2 = tmp2 * 10 + 1;
        tmp2 %= h2;
        feMem[TRUE][i] = tmp3;
        tmp3 *= 10;
        tmp3 %= h1;
        feMem[FALSE][i] = tmp4;
        tmp4 *= 10;
        tmp4 %= h2;
    }
}
LLI allOnes(int len, LLI mod) {
    return aoMem[mod==h1][len];
}

LLI agg(int pre, int suf, int pow, LLI mod) {
    LLI mult = feMem[mod==h1][pow];
    mult *= suf;
    mult += pre;
    mult %= mod;
    //printf(" returning from agg!\n");
    return mult;
}

void ITComp(int index) {
    if (carry[index] == NULL_CARRY) {
        ans[0][index] = agg(ans[0][index<<1], ans[0][(index<<1)|1], en[index<<1] - st[index<<1] + 1, h1);
        ans[1][index] = agg(ans[1][index<<1], ans[1][(index<<1)|1], en[index<<1] - st[index<<1] + 1, h2);
    } else {
        ans[0][index] = allOnes(en[index] - st[index] + 1, h1) * carry[index];
        ans[0][index] %= h1;
        ans[1][index] = allOnes(en[index] - st[index] + 1, h2) * carry[index];
        ans[1][index] %= h2;
    }
}

void push(int index) {
    if (carry[index] == NULL_CARRY)
        return;
    if (st[index] != en[index]) {
        carry[index<<1] = carry[index];
        ITComp(index<<1);
        carry[(index<<1)|1] = carry[index];
        ITComp((index<<1)|1);
    }
    carry[index] = NULL_CARRY;
}

void set2(int index, int s, int e, int value) {
    if (st[index] >= s && e >= en[index]) {
        carry[index] = value;
        ITComp(index);
        return;
    }
    if (st[index] > e || s > en[index])
        return;
    push(index);
    set2(index<<1, s, e, value);
    set2((index<<1)|1, s, e, value);
    ITComp(index);
}

void ITSet(int s, int e, int value) {
   set2(1, s, e, value);
}

LLI get2(int index, int type, int s, int e) {
    if (st[index] >= s && e >= en[index]) {
        //printf(" Starting Push!\n");
        //push(index);
        ITComp(index);
        //printf(" Out of Push!\n");
        if (type == 0) {
            //prL(agg(0, ans[type][index], st[index] - s, h1));
            return agg(0, ans[type][index], st[index] - s, h1);
        }
        return agg(0, ans[type][index], st[index] - s, h2);
    }
    if (st[index] > e || s > en[index])
        return NULL_VALUE;
    push(index);
    LLI ret = get2(index<<1, type, s, e) + get2((index<<1)|1, type, s, e);
    if (type == 0 && ret >= h1)
        ret -= h1;
    if (type == 1 && ret >= h2)
        ret -= h2;
    return ret;
}

LLI get(int type, int s, int e) {
   return get2(1, type, s, e);
}

int main(void) {
    int a, c, aa, cc, b = 0, pow = 1, bb;
    in2(a,c);
    while (a != 0 || c != 0) {
       aa = a % 3;
       cc = c % 3;
       bb = (3 + cc - aa) % 3;
       b += pow * bb;
       a/=3;
       c/=3;
       pow *= 3;
    }
    pri(b);
    return 0;
}

/* https://codeforces.com/contest/136/submission/35187182 (rainboy) */
#include <stdio.h>

int sub(int a, int c) {
	return a == 0 && c == 0 ? 0 : sub(a / 3, c / 3) * 3 + ((c - a) % 3 + 3) % 3;
}

int main() {
	int a, c;

	scanf("%d%d", &a, &c);
	printf("%d\n", sub(a, c));
	return 0;
}

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

int main()
{
   long long a, b, c;

    scanf("%lld%lld", &a, &c);

    b = 0;
    long long p = 1;
    while(a || c) {
        int aux1 = a % 3;
        int aux2 = c % 3;

        b = b + ((abs(aux2 - aux1 + 3)) % 3) * p;

        a /= 3;
        c /= 3;
        p *= 10;
    }

    long long axi = 0;
    p = 1;
    while(b) {
        axi += (b % 10) * p;
        b /= 10;
        p *= 3;
    }

    printf("%d", axi);
    return 0;
}

#include<stdio.h>
#define max(a,b) \
   ({ __typeof__ (a) _a = (a); \
       __typeof__ (b) _b = (b); \
     _a > _b ? _a : _b; })

typedef long long int ll;
int x[30],y[30];
int main()
{
	ll a,c,ans=0,temp=1;
	scanf("%lld %lld",&a,&c);

	int j=0;
	while(a)
	{
		x[++j] = a%3;
		a /= 3;
	}
	int i=0;
	while(c)
	{
		y[++i]=c%3;
		c /=3;
	}

	i = max(i,j);
	for(int k=1;k<=i;k++)
	{
		x[k]=y[k]-x[k]+3;
		x[k] = x[k]%3;
		if(x[k])
			ans += temp*x[k];
		temp *=3;
	}
	printf("%lld\n",ans);
	return 0;
}

#include <stdio.h>
#include <math.h>
main()
{
long int rust(int x);
long int lust(int x);
int arrb[20]={0};
long int a,c,ans=0;
scanf("%ld %ld",&a,&c);
int at,ct;
int k=0,i;
while(a!=0 || c!=0)
{
at=a%3;
ct=c%3;
a=a/3;
c=c/3;
switch(ct)
{
case(2):{arrb[k++]=(2-at);
        break;}

case(0):{if(at==0) arrb[k++]=0;
         else arrb[k++]=(3-at);
         break;}
case(1):{if(at==2) arrb[k++]=2;
         else arrb[k++]=(1-at);
         break;}
}
}
k=k-1;
for(i=k;i>=0;i--)
{
ans=ans+lust(i)*arrb[i];
}
printf("%ld",ans);
return 0;
}

long int rust(int x)
        {
            int i;
            long int k=1;
            for(i=1;i<=x;i++)
            k=k*10;
        return k;
        }

long int lust(int x)
        {
            int i;
            long int k=1;
            for(i=1;i<=x;i++)
            k=k*3;
        return k;
        }

#include <stdio.h>

void tern(int ar[], int size, int num);

void tern(int ar[], int size, int num)
{
    size--;

    while (num != 0)
    {
        ar[size] = num % 3;
        num = num / 3;
        size--;
    }
}

int main()
{
    int a, c, b = 0, A[25], B[25], C[25], i, j, k, mul = 1, add;

    for (i = 0; i < 25; i++)
    {
        A[i] = 0;
        B[i] = 0;
        C[i] = 0;
    }

    scanf("%d %d", &a, &c);

    tern(A, 25, a);
    tern(C, 25, c);

    for (i = 24; i >= 0; i--)
    {
        add = C[i] - A[i];

        if (add < 0) add += 3;

        b += add * mul;
        mul *= 3;
    }

    printf("%d", b);

    return 0;

}

#include <stdio.h>
#include <math.h>
main()
{
long int a,c,b=0;
scanf("%ld %ld",&a,&c);
int at,ct,i=0;
while(a!=0 || c!=0)
{
at=a%3;
ct=c%3;
a=a/3;
c=c/3;
ct+=3;
b = b + ((ct-at)%3)*(long int)pow(3,i);
i++;
}
printf("%ld",b);
return 0;
}

#include        <stdio.h>
int*            mtob(int a)
{
    int         *result;
    result = (int*)malloc(10000*sizeof(int));
    int         i,count;
    i  = a;
    count = 0;
    while (1)
    {
        count++;
        result[count] = i % 3;
        i = i/3;
        if (i==0) break;
    }
    result[0] = count;
    return result;
}
int             btom(int *a,int n)
{
    int         i,sum,k;
    sum = 0;
    k = 1;
    for (i=n;i>=1;i--)
    {
        sum+=k*a[i];
        k = 3*k;
    }
    return sum;
}
int             main()
{
    int         a,b,c;
    int         *aa,*cc;
    int         bb[10000],dd[10000];
    int         i,max;

    scanf("%d%d",&a,&c);
    aa = mtob(a);

    cc = mtob(c);
    if (aa[0]>cc[0]) max = aa[0] ;
    else max = cc[0];
    for (i=1;i<=max;i++){
        if (aa[i]<=cc[i]) bb[i] = cc[i]-aa[i];
        if (aa[i]>cc[i])  bb[i] = cc[i]+3-aa[i];
    }

    for (i=1;i<=max;i++)
        dd[i]=bb[max-i+1];
    b = btom(dd,max);
    printf("%d",b);

    return 0;

}

#include <stdio.h>
#include <math.h>
int main(void)
{
	long long a,c,b=0,t1,t2,n,i;
	scanf("%I64d %I64d",&a,&c);

	n=0;
	while(a!=0 || c!=0)
	{
		t1=a%3;t2=c%3;
		for(i=0;i<3;++i)
			if((i+t1)%3==t2){ b+=i*((long long)pow((double)3,(double)n)); break; }
		n++;a/=3;c/=3;
	}
	printf("%I64d",b);
	return 0;
}

#include<stdio.h>
#define ll long long
int s1[400],s2[400];
int pw(int x,int y){
    if(y<1) return 1;
    else return x*pw(x,y-1);
}
int main(){
    ll int a,b,i,j,l1=0,l2=0;
    memset(s1,0,sizeof(s1));
    memset(s2,0,sizeof(s2));
    scanf("%lld%lld",&a,&b);
    while(a>0){
        s1[l1++]=a%3;
        a/=3;
    }
    while(b>0){
        s2[l2++]=b%3;
        b/=3;
    }
    int ans=0;
    for(i=0;i<l1||i<l2;i++){
        for(j=0;j<3;j++){
            if((s1[i]+j)%3==s2[i]){
                break;
            }
        }
        ans+=j*pw(3,i);
    }
    printf("%d",ans);
    return 0;
}

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

int main()
{
    int a,c;
    scanf("%d %d",&a,&c);

    int a1,c1,i,n,k;
    for(i=0,n=0,k=1;a||c;i++,k*=3)
    {
        a1=a%3;
        c1=c%3;
        a/=3;
        c/=3;
        if(!a1)
        {
            n+=k*c1;
            continue;
        }
        if(!c1)
        {
            n+=k*(3-a1);
            continue;
        }
        if(a1>c1)
        {
            n+=k*(3-c1);
        }
        else
        {
            n+=k*(c1-a1);
        }
    }
    printf("%d",n);
    return 0;
}

#include <stdio.h>
#include <math.h>

#define max_digits_count 19
#define base 3

char toChar(int x)
{
    return x + '0';
}

void swap(char* x, char* y)
{
    char tmp = *x;
    *x = *y ;
    *y = tmp;
}

char* reverseStr(char* s)
{
    int iLength = strlen(s);
    char* ret = (char*)malloc(iLength);
    unsigned int i = 0;
    for(;  s[i] ; ++i)
        ret[i] = s[i];

    int lo = 0 , hi = iLength - 1;
    while(hi > lo)
    {
        swap(&ret[lo], &ret[hi]);

//      printf("lo = %d, hi = %d, after swap , ret = %s\n", lo, hi , ret);
        lo++;
        hi--;
    }

    ret[iLength] = 0;
    return ret;
}

char* toTenary(int x)
{
    char* ret = (char*)malloc(max_digits_count);
    int iCounter = 0;
    while(x)
    {
        ret[iCounter++] = toChar(x%base);
        x /= base;
    }
    ret[iCounter] = 0;

    while(strlen(ret) < max_digits_count)
    {
        ret[iCounter++] = '0';
        ret[iCounter] = 0;
    }
    ret[max_digits_count] = 0;

    //printf("before reverse, ret = %s\n", ret);

    ret = reverseStr(ret);
    return ret;
}

char min_path(char a, char c)
{
    int ia = a - '0', ic = c - '0' , ib = 0, tmp = 0;;
    for(tmp = 0; tmp <= 2; ++tmp)
    {
        if((ia+tmp)%base == ic) {
            ib = tmp;
            break;
        }
    }
    return toChar(ib);
}

char* solve(char* sa, char* sc)
{
    char* ret = (char*)malloc(max_digits_count);
    ret[max_digits_count] = 0;

    int hi = max_digits_count-1;
    while(hi >= 0)
    {
        ret[hi] = min_path(sa[hi], sc[hi]);
        hi--;
    }

    return ret;
}

int tenaryToDecimal(char* s)
{
    int i = 0, base_pow = 1 , ret = 0;
    int iLength = strlen(s);
    for(i = iLength-1; i >= 0; --i)
    {
        ret += (s[i]-'0')*base_pow ;
        base_pow *= base;
    }

    return ret;
}

int main()
{

#ifndef ONLINE_JUDGE
    freopen("inputC.txt"  ,"r", stdin);
    freopen("outputC.txt" ,"w", stdout);
#endif

    int a, b, c ;
    scanf("%d %d",&a,&c);

    /*
    char* s = reverseStr("abc");
    printf("%s\n",s);
    */

    char* sa = toTenary(a) ;
    char* sc = toTenary(c) ;

    //printf("sa = %s\n",sa);
    //printf("sc = %s\n",sc);

    char* sb = solve(sa,sc);
    //printf("%s\n",sb);
    printf("%d\n", tenaryToDecimal(sb));
    return 0;
}

#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#define MAX 1000
int diff(int a, int b,char *c)//a-b
{
   char f[MAX]={},s[MAX]={};
   int i,j,k,digits;
   int ii;
   for(i=MAX-2;a;i--){
      f[i]=a%3+'0'+3;
      a/=3;
   }
   for(j=MAX-2;b;j--){
      s[j]=b%3+'0';
      //   printf("%c",s[j]);
      b/=3;
   }
   //  printf("\n");
   digits=MAX-((i<j)?i:j)-2;
   //      printf("%d\n",digits);
   for(k=0;k<i-j;k++)
      f[k]='3';
   ii=i;
   for(ii++;ii<MAX-1;k++,ii++)
      f[k]=f[ii];
   f[k]='\0';

   // printf("j is %d and i is %d\n",j,i);
   for(k=0;k<j-i;k++)
      s[k]='0';
   for(j++;j<MAX-1;k++,j++)
      s[k]=s[j];
   s[k]='\0';
   for(i=0;i<digits;i++)
      c[i]=(f[i]-s[i])%3;
   return digits;
   //for(ii
}
int todec(char *a, int dig)
{
   int i=0,ans=0;
   for(i=0;i<dig;i++)
      ans=ans*3+a[i];
   return ans;
}
int main()
{
   int cases,cnt;
   int i,n;
   int a,c;
   char ans[MAX];
   scanf("%d%d",&a,&c);
   printf("%d\n",todec(ans,diff(c,a,ans)));
   return 0;
}

#include<stdio.h>
int main()
{
	long long int a,b;
	int A[100],B[100],C[100];
	scanf("%lld %lld",&a,&b);
	int ka=0;
	while(a>0)
	{
		A[ka++]=a%3;
		a=a/3;
	}
	int kb=0;
	while(b>0)
	{
		B[kb++]=b%3;
		b=b/3;
	}
	while(ka<kb)
		A[ka++]=0;
	while(kb<ka)
		B[kb++]=0;
	int i;
	for(i=0;i<ka;i++)
	{
		C[i]=B[i]-A[i];
		if(C[i]<0)
			C[i]+=3;
	}
	int kc=i;
	long long int c=0;
	long long int prod=1;
	for(i=0;i<kc;i++)
	{
		c = c + prod*C[i];
		prod*=3;
	}
	printf("%lld\n",c);
	return 0;
}

#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<math.h>
#include<ctype.h>
int main(void)
{
	int a,b=0,c;
	int i=0;
	scanf("%d%d",&a,&c);
	while(a || c)
	{
		b += ((((c%3)-(a%3))%3)+3)%3 *pow(3,i);
		a /= 3;
		c /= 3;
		i++;
	}
	printf("%d\n",b);
    return 0;
}

#include <stdio.h>

int a, b , ta[101] , tb[101] , tc[101] , sa,sb,sc, c, i,j,k , n ;

int main()
{
    scanf("%d %d", &a, &b) ;

    while( a > 0 )
    {
        ta[sa] = a%3 ;
        a =a/3 ;
        sa++ ;
    }

      while( b > 0 )
    {
        tb[sb] = b%3 ;
        b =b/3 ;
        sb++ ;
    }
/*
    printf("test for a : ") ;
    for ( i = 0 ; i < sa ;i++)
    {
        printf("%d ", ta[i] ) ;
    }

     printf("\ntest for a : ") ;
    for ( i = 0 ; i < sb ;i++)
    {
        printf("%d ", tb[i] ) ;
    }

    printf("\n") ;
*/

    if ( sa > sb ) sc = sa ;
    else sc =sb ;

    for( i = 0 ; i < sc ; i++)
    {
        tc[i] =  tb[i] - ta[i]  ;

        if ( tc[i] < 0 ) tc[i] += 3 ;
    }

   /*  printf("test for a : ") ;
    for ( i = 0 ; i < sc ;i++)
    {
        printf("%d ", tc[i] ) ;
    }
    printf("\n" ) ; */

    for ( i = sc-1 ; i > -1 ; i--)
    {
        c = 3 * c + tc[i] ;
    }

    printf("%d" , c) ;
 return 0;
 }

#include <stdio.h>

int sub(int a, int c) {
	return a < 3 && c < 3 ? (c - a + 3) % 3 : sub(a / 3, c / 3) * 3 + ((c - a) % 3+ 3) % 3;
}

int main() {
	int a, c;

	scanf("%d%d", &a, &c);
	printf("%d\n", sub(a, c));
	return 0;
}

#include<stdio.h>
long long int dk(long long int m,long long int n[]);
long long int main()
{
long long int a,b,c,d=0,i,e=0,k=0,g=0;
long long int p[10000]={0},q[10000],f[10000];
scanf("%I64d%I64d",&a,&c);
d=dk(a,p);
e=dk(c,q);
if(d==e)
{
next:
for(i=0;i<d;i++)
{
k=0;
while(((p[i]+k)%3)!=q[i])
{
k++;
}
f[i]=k;
}
}
else
{
if(d>e)
{
while(d!=e)
{
q[e]=0;
e++;
}
goto next;}
else
{
while(d!=e)
{
p[d]=0;
d++;
}
goto next;}
}
for(i=0;i<d;i++)
{
g=g+f[i]*pow(3,i);
}
printf("%I64d",g);
return(0);
}
long long int dk(long long int m,long long int n[])
{
    int x=0;
while(m>0)
{
n[x++]=m%3;
m=(m-(m%3))/3;
}
return(x);
}

#include <stdio.h>
#include <string.h>
int max(int x, int y)
{
	return x > y ? x : y;
}
int main()
{
	int a, b, i, j, t, sum;
	int n1[1001], n2[1001];
	while (scanf("%d %d", &a, &b) != EOF)
	{
		memset(n1, 0, sizeof(n1));
		memset(n2, 0, sizeof(n2));
		i = 0;
		while (a)
		{
			n1[i] = a % 3;
			a /= 3;
			i++;
		}
		j = 0;
		while (b)
		{
			n2[j] = b % 3;
			b /= 3;
			j++;
		}
		t = max(i, j);
		for (i=0; i<t; i++)
		{
			n1[i] = (n2[i] - n1[i] + 3) % 3;
		}
		sum = 0;
		for (i=t-1; i>=0; i--)
		{
			sum *= 3;
			sum += n1[i];
		}
		printf("%d\n", sum);
	}

	return 0;
}

#include<stdio.h>
#include<string.h>
#include<math.h>
#define max  100
int main()
{
    int a,b,i,j,t,t1,t2;
    int c[max],d[max],e[max];
    memset(c,0,sizeof(c));
    memset(d,0,sizeof(d));
    memset(e,0,sizeof(e));

    scanf("%d %d",&a,&b);
    i=0;
    while(a!=0)
    {
        c[i]=a%3;
        a=a/3;
        i++;
    }
    j=0;
    while(b!=0)
    {
        d[j]=b%3;
        b=b/3;
        j++;
    }

    if(i>j)
        t2=i;
    else
        t2=j;

    for(i=t2-1; i>=0; i--)
    {
        if(d[i]<c[i])
            d[i]=d[i]+3;
        e[i]=d[i]-c[i];
    }
    double sum=0.0;
    for(i=0; i<t2; i++)
        sum=sum+e[i]*pow(3.0,(double)i);
    printf("%d\n",(int )sum);
    return 0;
}

#include <stdio.h>

int tor(int a, int c)
{
    if(!a && !c)
        return 0;

    return tor(a / 3, c / 3) * 3 + c % 3 - a % 3 + 3 * (a % 3 > c % 3);
}

int main(int argc, char *argv[])
{
    int a, c;

    scanf("%d %d", &a, &c);
    printf("%d\n", tor(a, c));

    return 0;
}

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#define MAX_LEN 30
void encode(int* cs3,unsigned int a){
    int n=0;
    int i;
    for(i=0;i<MAX_LEN;i++)cs3[i]=0;
    n=0;
    while(a>0){
        cs3[n++]=a%3;
        a/=3;
    }
}
unsigned int decode(int* cs3){
    unsigned int rt=0;
    int n;
    n=MAX_LEN-1;
    while(cs3[n]==0) n--;
    for(;n>=0;n--){
        rt=rt*3+cs3[n];
    }
    return rt;
}
void print(int* cs3){
    int i;
    for(i=0;i<MAX_LEN;i++)printf("%d",cs3[i]);
    printf("\n");
}
int min(int a,int b){
    if(a>b||a<0) return b;
    else return a;
}
int main(){
    unsigned int a,b;
    int i;
    int cs3a[MAX_LEN];
    int cs3b[MAX_LEN];
    int cs3c[MAX_LEN];
    scanf("%d %d",&a,&b);
    encode(cs3a,a);
    encode(cs3b,b);
    //print(cs3a);
    //print(cs3b);
    for(i=0;i<MAX_LEN;i++){
        cs3c[i]=min(cs3b[i]-cs3a[i],cs3b[i]-cs3a[i]+3);
    }
    //print(cs3c);
    printf("%d",decode(cs3c));
    return 0;
}

#include <stdio.h>
#define maxn 1000
long basea[maxn],baseb[maxn],basec[maxn];
long a,b,c;
long d1,d2,d3;
int main()
{
    long i,tmp=0;
    scanf("%ld %ld",&a,&c);
    while (a>0)
       {
        basea[d1++]=a%3;
        a/=3;
        }
    while (c>0)
       {
        basec[d3++]=c%3;
        c/=3;
        }
    if (d1>d3) d2=d1;
    else d2=d3;
    for (i=0;i<d2;i++)
       {
        tmp=basec[i]-basea[i];
        baseb[i]=(tmp+3)%3;
        //tmp/=3;
        }
    tmp=1;
    for (i=0;i<d2;i++)
       {
        b+=baseb[i]*tmp;
        tmp*=3;
        }
    printf("%ld",b);
    return 0;
}

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

char Str1[31],Str2[31];

int main()
{
    int A,C,L1,L2,L,i,p=1,ans;
    scanf("%d %d",&A,&C);
    itoa(A,Str1,3);
    itoa(C,Str2,3);
    L1=strlen(Str1);
    L2=strlen(Str2);
    L=L1>L2?L1:L2;
    strrev(Str1);
    strrev(Str2);
    if(L1>L2)
    {
        for(i=L2; i<L; ++i)
        {
            Str2[i]='0';
        }
    }
    else
    {
        for(i=L1; i<L; ++i)
        {
            Str1[i]='0';
        }
    }
    for(p=1,ans=i=0; i<L; ++i)
    {
        ans+=((Str2[i]+3-Str1[i])%3)*p;
        p*=3;
    }
    printf("%d\n",ans);
    return 0;
}

#include <stdio.h>
#include <math.h>
#include <string.h>

#define RADIX 3

int getTernary(int a, int radix, int ta[])
{
	int j = 0;
	while(a > 0)
	{
		ta[j] = a % radix;
		a = a / radix;
		++j;
	}
	return --j;
}

int main()
{
	int a,b,c;
	int ina, inc, index;
	int i;
	int ta[20];
	int tb[20];
	int tc[20];

	scanf("%d%d", &a, &c);
	memset(ta, 0, 20*sizeof(int));
	memset(tb, 0, 20*sizeof(int));
	memset(tc, 0, 20*sizeof(int));
	ina = getTernary(a, RADIX, ta);
	inc = getTernary(c, RADIX, tc);
	if(ina >= inc)
	{
		index = ina;
	}
	else
	{
		index = inc;
	}

	for(i = 0; i <= index; ++i)
	{
		if(tc[i] >= ta[i])
			tb[i] = tc[i] - ta[i];
		else
			tb[i] = tc[i] + RADIX - ta[i];
	}
	b = 0;
	for(i = 0; i <= index; ++i)
	{
		b = b + tb[i] * pow((double)RADIX, i);
	}
	printf("%d\n", b);
	return 0;
}

#include<stdio.h>
long long int convert(long long int d[],long long int a)
{
long long int x=0;
while(a>0)
{
d[x++]=a%3;
a=(a-(a%3))/3;
}
return(x);
}
add(long long int d[],long long int i,long long int j)
{
    long long int x;
for(x=i;x<j;x++)
d[x]=0;
return(j);
}

main()
{
    long long int a,c,t=1,x,i,j;
    scanf("%I64d%I64d",&a,&c);
    long long int d[100],e[100],f[100],g[3][3]={{0,1,2},{2,0,1},{1,2,0}};
    i=convert(d,a);
    j=convert(e,c);
    if(i>j)
    j=add(e,j,i);
    else if(j>i)
    i=add(d,i,j);
    for(x=0;x<j;x++)
    f[x]=g[d[x]][e[x]];
    a=0;
    for(x=0;x<j;x++,t=t*3)
    a=a+f[x]*t;
    printf("%I64d",a);
    return(0);
}

#include<stdio.h>
int main()
{
    long a,c,ans=0,pow=1;
    scanf("%ld%ld",&a,&c);
    short int i,j;
    while(a||c)
    {
        ans+=pow*((3+c%3-a%3)%3);
        pow*=3;
        a/=3;
        c/=3;
    }
    printf("%ld",ans);
    return 0;
}

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

int main()
{
    int a,c;
    int b;
    int temp1,temp2;
    int mnoznik;

    scanf("%d %d",&a,&c);
    b = 0;
    mnoznik = 1;
    while((a != 0) || (c != 0))
    {
        temp1 = a % 3;
        temp2 = c % 3;
        a = a / 3;
        c = c / 3;
        if(temp2 >= temp1)
            b += mnoznik * (temp2-temp1);
        else
            b += mnoznik * (3-(temp1-temp2));
        mnoznik *= 3;
    }

    printf("%d",b);
    return 0;
}

#include <stdio.h>

typedef long long Long;

int main() {
    int a,c,i;
    scanf("%d%d",&a,&c);
    int arr[100] = {0}; int cnt = 0;
    while (a > 0 || c > 0) {
        int ta = a % 3;
        int tc = c % 3;
        a /= 3;
        c /= 3;
        arr[cnt ++] = (tc - ta + 9) % 3;
    }
    Long ans = 0;
    for (i = cnt - 1; i > -1; i--) {
        ans = ans * 3 + arr[i];
    }
    printf("%lld\n",ans);
    return 0;
}

#include<stdio.h>
#include<stdlib.h>
#include<math.h>
#include<string.h>
#define REP(i,a,b) for(i=a;i<b;i++)
#define rep(i,n) REP(i,0,n)

int main(){
  int a, b, c, pw, add;

  scanf("%d%d",&a,&c);
  b = 0; pw = 1;

  while(a || c){
    add = ((c%3) - (a%3) + 3)%3;
    b += add * pw;
    pw *= 3;
    a /= 3; c /= 3;
  }

  printf("%d\n",b);

  return 0;
}

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

int main()
{
    long a,c,ans=0,i=0;
    scanf("%ld%ld",&a,&c);
    while(a!=0 || c!=0)
    {
         ans+=(c%3-a%3+3)%3*pow(3,i);
         a/=3;
         c/=3;
         i++;
    }
    printf("%ld\n",ans);
    return 0;
}

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

#define fp(i,a,b,c)  for(i=a;i<b;i+=c)
#define fn(i,a,b,c)  for(i=a;i>b;i-=c)
#define fs(i,a)      for(i=0;i<a;i++)
#define sci(a)       scanf("%d",&a)
#define sci2(a,b)       scanf("%d%d",&a,&b)
#define pf(a)         printf("%d ",a)
#define pf2(a,b)         printf("%d %d",a,b)

int cnvrttrnr(int a,int s[])
{
    int i;
    int a1[100000];
    int k=0;
    a1[0]=0;
while(a!=0){
    a1[k]=a%3;
    a=a/3;
    k++;

}
fs(i,k)
{
    s[i]=a1[i];
}
return k;

}
int powr3(int l)
{
    int i;
    int ans=1;
    fs(i,l)
    ans*=3;

    return ans;
}
int main()
{
  int i,j,k,l,a,b,c;
  sci2(a,c);
  int s1[100000],s2[10000],s3[10000];
  int l1=cnvrttrnr(a,s1);
  int l2=cnvrttrnr(c,s2);

  /*fs(i,l1)
  pf(s1[i]);
   fs(i,l2)
  pf(s2[i]);*/
  if(l1>l2)
  {
      fp(i,l2,l1,1)
      s2[i]=0;
  }else
  {
      fp(i,l1,l2,1)
      s1[i]=0;
  }

    if(l1>l2)
    {fs(i,l1)
    {
        fs(j,3)
        {if(((s1[i]+j)%3==s2[i]))
        {
          s3[i]=j;
        }
        }
    }}
    else
    {
        fs(i,l2)
    {
        fs(j,3)
        {if(((s1[i]+j)%3==s2[i]))
        {
          s3[i]=j;
          break;
        }
        }
    }
    }

    int ans=0;
    if(l1>l2)
    fs(i,l1)
    {
        int p=powr3(i);
       ans+=s3[i]*p;
    }
    else
    fs(i,l2)
    {
      int p=powr3(i);
       ans+=s3[i]*p;
    }

pf(ans);

  return 0;
}

#include<stdio.h>

int f(int *s,int x)
{
    int i=0;
    while(x)
    {
       s[i++]=x%3;
       x/=3;
    }
    return i;
}
int main()
{
    int a[100],c[100],aa,cc,i,j,num;
    scanf("%d %d",&aa,&cc);
    i=f(a,aa);
    j=f(c,cc);
    while(i<j)
    a[i++]=0;
    while(j<i)
    c[j++]=0;
    num=0;
    while((--i)>=0)
    {
       num*=3;
       num+=(c[i]-a[i]+3)%3;
    }
    printf("%d\n",num);
    //system("pause");
    return 0;
}

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

int a,c,t,b,i;

int main(void) {
	scanf("%d %d", &a, &c);
	while (a||c) {
		t*=3;
		t+=(3+c%3-a%3)%3;
		a/=3;
		c/=3;
		++i;
	}
	while (i--) {
		b*=3;
		b+=t%3;
		t/=3;
	}
	printf("%d\n", b);
	exit(EXIT_SUCCESS);
}

#include <stdio.h>
#include <math.h>
int main (void)
{
	unsigned int a, b = 0, c, i;
	scanf ("%u%u", &a, &c);
	for (i = 0; a != 0 || c != 0; i++)
	{
		b += (c % 3 - a % 3 + 3) % 3 * pow (3, i);
		a /= 3;
		c /= 3;
	}
	printf ("%u\n", b);
	return 0;
}

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

int *na3(long int x){
    int *wynik=malloc(30*sizeof(int));
    int i;

    for (i=0; i<30; ++i){
        wynik[i]=x%3;
        x=x/3;
    }
    return wynik;
}

int main()
{
    int *a3, *b3, *c3;
    long int a,b,c;
    int i;

    b3=malloc(30*sizeof(int));
    scanf("%ld %ld", &a,&c);
    a3=na3(a);
    c3=na3(c);
    for (i=0; i<30; ++i){
        if (c3[i]>=a3[i]){
            b3[i]=c3[i]-a3[i];
        } else{
            b3[i]=c3[i]+3-a3[i];
        }
    }
    b=0;

    for (i=29; i>=0; --i){
        b=b*3+b3[i];
    }
    printf("%ld", b);
    return 0;
}

#include <stdio.h>
#include <math.h>

void change_base (int a, int arr[], int base) {
    int orig=a;
    int i,pow=1;
    int max = floor(log(orig)/log(base));
//    printf ("max=%d\n",max);
    for (i=0;i<max+1;i++) {
//        printf("a=%d pow=%d\n",a,pow);
        arr[i]=a%3;
        a/=3;
        pow*=3;
    }
}

void print_array (int a[], int len) {
    int i;
    for (i=0;i<len;i++) {
        printf ("%d ",a[i]);
    }
    printf ("\n");
}

int main (void) {

    int a,c;
    scanf ("%d %d",&a,&c);

    int a3[20]={0};
    change_base(a,a3,3);
    int c3[20]={0};
    change_base(c,c3,3);

    int b=0;
    int b3[19]={0};
    int i;
    for (i=0;i<19;i++) {
        b3[i]=(c3[i]-a3[i]+3)%3; // c mods negatives weirdly
        b+=pow(3,i)*b3[i];
    }
//    print_array (a3,20);
//    print_array (c3,20);
//    print_array (b3,20);
    printf ("%d\n",b);
    return 0;
}

/* Author: Abhay
   Problem: 136B Codeforces
   Language: C
 */

#include <stdio.h>

int ternary (int x, int result[])
{
    int i = 0;

    while (x)
    {
        result[i++] = x % 3;
        x /= 3;
    }

    return i;
}

int main ()
{
    int a, b, c, len_a, len_c, i, mul;
    int ternary_a[100], ternary_b[100], ternary_c[100];

    scanf ("%d %d", &a, &c);

    len_a = ternary (a, ternary_a);
    len_c = ternary (c, ternary_c);

    while (len_a < len_c)
        ternary_a[len_a++] = 0;

    while (len_c < len_a)
        ternary_c[len_c++] = 0;

    for (i=0; i<len_a; i++)
    {
        if (ternary_c[i] == 0)
        {
            if (!ternary_a[i])
                ternary_b[i] = 0;
            else
                ternary_b[i] = 3 - ternary_a[i];
        }
        else if (ternary_c[i] == 1)
        {
            if (ternary_a[i] == 2)
                ternary_b[i] = 2;
            else
                ternary_b[i] = 1 - ternary_a[i];
        }
        else
            ternary_b[i] = 2 - ternary_a[i];
    }

    while (len_a < len_c)
    {
        ternary_b[len_a] = ternary_c[len_a];
        len_a++;
    }

    b = 0;
    mul = 1;

    for (i=0; i<len_c; i++)
    {
        b += (ternary_b[i] * mul);
        mul *= 3;
    }

    printf ("%d\n", b);

    return 0;
}

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

long long int trinary(long long int n){
	long long int cnt=1,s=0,l;
	while(n!=0){
		l=n%3;
		s=cnt*l+s;
		cnt=cnt*10;
		n=n/3;
	}
	return s;
}
long long int tri(long long int n)
{
	long long int o,r,f,l=0,s=0,i;
	while (n!=0){
		r=n%10;
		if (r!=0){
			f=1;
			for (i=1;i<=l;i++){
				f=f*3;
			}
			o=f*r;
			s=s+o;
		}
		l=l+1;

		n=n/10;
	}
	return s;
}
int main()
{
	long long int a,b,r,s,t,e,f,l,cnt,w,q;
	scanf("%lld %lld",&a,&b);
	r=trinary(a);
	t=trinary(b);
	if (t>=r){
		cnt=1;
		s=0;
		while(t!=0){
			f=t%10;
			e=r%10;
			q=(f-e);
			if (q>=0){
				l=q%3;
			}
			else{
				l=3-(abs(q)%3);
			}
			s=s+l*cnt;
			cnt=cnt*10;
			t=t/10;
			r=r/10;

		}
	}
	else{
		cnt=1;
		s=0;
		while(r!=0){
			f=t%10;
			e=r%10;
			q=(f-e);
			if (q>=0){
				l=q%3;
			}
			else{
				l=3-(abs(q)%3);
			}
			s=s+l*cnt;
			cnt=cnt*10;
			t=t/10;
			r=r/10;

		}
	}
	w=tri(s);
	//w=pow(3,2);
	printf("%lld",w);
	return 0;
}

#include<stdio.h>
int a1[50],b1[50];
int main(){
	int a,b=0,c,i,ta,ta2;
	int ma,p=1,temp,temp2;
	scanf("%d %d",&a,&c);
		for(i=0;i>=0;i++){
		if(a>=1){
		a1[i]=a%3;
		a=a/3;
		}
		else {
			ta=i;
			break;
		}
		}
		for(i=0;i>=0;i++){
		if(c>=1){
		b1[i]=c%3;
		c=c/3;
		}
		else {
		ta2=i;
		break;
		}
		}
		if(ta>ta2){
		ma=ta;
		}
		else {
		ma=ta2;
		}
		/*for(i=0;i<ma;i++){
		printf("%d\n",b1[i]);
		}*/
		for(i=0;i<ma;i++){
		temp=a1[i]*2;
		temp2=b1[i];
		temp=temp+temp2;
		temp=temp%3;
		b=b+(temp*p);
		p=p*3;
		temp=0;
		temp2=0;
		}
		printf("%d\n",b);
		return 0;
}

#include <stdio.h>
#include <math.h>
long int arr[100],brr[100],crr[100],i=0,j=0,k=0;
void func(long int a)
{
	while(a>0)
	{
			arr[i]=a%3;
		//	printf("%d\n",a%3);
			i++;
			a=a/3;
	}
	i--;
}
void func1(long int a)
{
	while(a>0)
	{
			crr[j]=a%3;
		//	printf("%d\n",a%3);
			j++;
			a=a/3;
	}
	j--;
}
int main()
{
		long int a,c,b,l;
		scanf("%ld %ld",&a,&c);
		func(a);
		func1(c);
		if(i<j)
		{
				for(k=i+1;k<=j;k++)
				arr[k]=0;
				i=j;
		}
		else if(j<i)
		{
			for(k=j+1;k<=i;k++)
			crr[k]=0;
			j=i;
		}
		k=0;
//		for(k=0;k<=i;k++)
//		{
//			printf("%d ",arr[k]);
//		}
//		printf("\n");
//		for(k=0;k<=j;k++)
//		{
//			printf("%d ",crr[k]);
//		}
//		printf("\n");

		for(l=0;l<=i;l++)
		{
			if(crr[l]-arr[l]>=0)
			{
			brr[l]=crr[l]-arr[l];
		//	k++;
			}
			else
			{
				brr[l]=3+crr[l]-arr[l];
			}
		}
		long int ans=0;
		for(l=i;l>=0;l--)
		{
			ans=3*ans+brr[l];
//			printf("%d ",brr[l]);
		}
//		printf("\n");
		printf("%ld\n",ans);
		return 0;
}

#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <string.h>
//||
//\n
int cmpfunc (const void * a, const void * b)
{
   return ( *(int*)a - *(int*)b );
}
int main()
{
             long long int a,b,c,d=-1,e,i,j=1,k,sum=0,sum1=0,ct=0;
             long long int x[100]={0},y[100]={0};
             scanf("%lld %lld",&a,&b);
             c=a;
             d=b;
             while(c!=0)
             {
                          x[sum]=(c%3);
                          c=c/3;
                          sum++;
             }
             while(d!=0)
             {
                          y[sum1]=(d%3);
                          d=d/3;
                          sum1++;
             }
             e=sum>=sum1?sum:sum1;

             for(i=0;i<e;i++)
             {
                          if(x[i]>y[i])
                                       ct=ct+(y[i]-x[i]+3)*j;
                          else
                                       ct=ct+(y[i]-x[i])*j;
                          j=j*3;

             }
             printf("%lld",ct);
             return 0;}

#include        <stdio.h>
int*            mtob(int a)
{
    int         *result;
    result = (int*)malloc(10000*sizeof(int));
    int         i,count;
    i  = a;
    count = 0;
    while (i!=0)
    {
        count++;
        result[count] = i % 3;
        i = i/3;
    }
    result[0] = count;
    return result;
}
int             btom(int *a,int n)
{
    int         i,sum,k;
    sum = 0;
    k = 1;
    for (i=n;i>=1;i--)
    {
        sum+=k*a[i];
        k = 3*k;
    }
    return sum;
}
int             main()
{
    int         a,b,c;
    int         *aa,*cc;
    int         bb[10000],dd[10000];
    int         i,max;

    scanf("%d%d",&a,&c);
    aa = mtob(a);

    cc = mtob(c);
    if (aa[0]>cc[0]) max = aa[0] ;
    else max = cc[0];
    for (i=1;i<=max;i++){
        if (aa[i]<=cc[i]) bb[i] = cc[i]-aa[i];
        if (aa[i]>cc[i])  bb[i] = cc[i]+3-aa[i];
    }

    for (i=1;i<=max;i++)
        dd[i]=bb[max-i+1];
    b = btom(dd,max);
    printf("%d",b);

    return 0;

}

#include <stdio.h>
#include <math.h>
int main()
{
    long int a,c,d,d1,b=0;
    int at[19] = {0},ct[19] = {0},i;
    scanf("%ld %ld",&a,&c);
    /*a to ternary no.*/
        d = ceil(log(a)/log(3));
        d1=d;
        for(i=d;i>=0;i--)
        {
            at[i] = a/(long int)pow(3,i);
            a = a%(long int)pow(3,i);
        }
    /*c to ternary no.*/
        d = ceil(log(c)/log(3));
        for(i=d;i>=0;i--)
        {
            ct[i] = c/(long int)pow(3,i);
            c = c%(long int)pow(3,i);
        }
    for(i = (d1>d)? d1:d;i>=0;i--)
    {
        ct[i] +=3;
        b = b + (abs((ct[i]-at[i])%3))*(long int)pow(3,i);
    }
    printf("%ld",b);
    return 0;
}

#include <stdio.h>
#include <math.h>
int main()
{
    long int a,c;
    long long int b=0;
    int at[19] = {0},ct[19] = {0},i,d,d1;
    scanf("%ld %ld",&a,&c);
    /*a to ternary no.*/
        d = ceil(log(a)/log(3));
        d1=d;
        for(i=d;i>=0;i--)
        {
            at[i] = a/(long int)pow(3,i);
            a = a%(long int)pow(3,i);
        }
    /*c to ternary no.*/
        d = ceil(log(c)/log(3));
        for(i=d;i>=0;i--)
        {
            ct[i] = c/(long int)pow(3,i);
            c = c%(long int)pow(3,i);
        }
    for(i = (d1>d)? d1:d;i>=0;i--)
    {
        ct[i] +=3;
        b = b + (abs((ct[i]-at[i])%3))*(long int)pow(3,i);
    }
    printf("%I64d",b);
    return 0;
}

#include <stdio.h>
#include <math.h>
#include <string.h>

#define RADIX 3

int getTernary(int a, int radix, int ta[])
{
	int j;
	int maxindex;
	int temp;

	memset(ta, 0, 20*sizeof(int));
	for(j = 0; pow((double)radix, j) <= a; ++j)
		;
	--j;
	maxindex = j;
	while(j >= 0)
	{
		temp = pow((double)radix, j);
		ta[j] = a / temp;
		a %= temp;
		--j;
	}
	return maxindex;
}

int main()
{
	int a,b,c;
	int ina, inc, index;
	int i;
	int ta[20];
	int tb[20];
	int tc[20];

	scanf("%d%d", &a, &c);
	ina = getTernary(a, RADIX, ta);
	inc = getTernary(c, RADIX, tc);
	if(ina >= inc)
	{
		index = ina;
	}
	else
	{
		index = inc;
	}
	memset(tb, 0, 20*sizeof(int));
	for(i = 0; i <= index; ++i)
	{
		if(tc[i] >= ta[i])
			tb[i] = tc[i] - ta[i];
		else
			tb[i] = tc[i] + RADIX - ta[i];
	}
	b = 0;
	for(i = 0; i <= index; ++i)
	{
		b = b + tb[i] * pow((double)RADIX, i);
	}
	printf("%d\n", b);
	return 0;
}

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

int main()
{
    long long a,c,ans=0,i=0;
    scanf("%lld%lld",&a,&c);
    while(a!=0 || c!=0)
    {
         ans+=(c%3-a%3+3)%3*pow(3,i);
         a/=3;
         c/=3;
         i++;
    }
    printf("%lld\n",ans);
    return 0;
}

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

int a1[100];
int  b1[100];
int main()
{
 		long long a,b;
 		scanf("%lld%lld",&a,&b);
 		int  i=0;
 		memset(a1,0,100);
 		memset(b1,0,100);
 		while(a && b)
 		{
			 a1[i]=(int)a%3;
			 b1[i]=(int)b%3;
			 a/=3;
			 b/=3;
			 i++;
    }
    if(a>0)
    {
		  while(a)
      {
		   a1[i]=(int)a%3;
			 b1[i]=0;
			 a/=3;
			 i++;
		  }
		 }
    else
    {
		  while(b)
      {
		   b1[i]=(int)b%3;
			 a1[i]=0;
			 b/=3;
			 i++;
		  }
		 }
		 i-=1;
		 int j=0;
		 long long temp=0;
		 int c[100];
		 for(j=0;j<=i;j++)
     {
	         c[i-j]=(b1[j]-a1[j]+3)%3;
		 }
		 for(j=0;j<=i;j++)
		     temp=temp*3+c[j];
		 printf("%lld\n",temp);
// 		system("pause");
 		return 0;
}

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

int main()
{
    long long a,c,ans=0,i=0;
    scanf("%lld%lld",&a,&c);
    while(a!=0 && c!=0)
    {
         ans+=(c%3-a%3+3)%3*pow(3,i);
         a/=3;
         c/=3;
         i++;
    }
    if(a==0)
    {
        while(c!=0)
        {
              ans +=c%3 *pow(3,i);
              c/=3;
              i++;
        }
    }
    if(c==0)
    {
        while(a!=0)
        {
              ans+=(3-a%3)*pow(3,i);
              a/=3;
              i++;
        }
    }
    printf("%lld\n",ans);
    return 0;
}

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

int main()
{
    long long a,c,ans=0,i=0;
    scanf("%lld%lld",&a,&c);
    while(a!=0 && c!=0)
    {
         ans+=(c%3-a%3+3)%3*(long long)pow(3,i);
         a/=3;
         c/=3;
         i++;
    }
    if(a==0)
    {
        while(c!=0)
        {
              ans +=c%3 *(long long)pow(3,i);
              c/=3;
              i++;
        }
    }
    if(c==0)
    {
        while(a!=0)
        {
              ans+=(3-a%3)*(long long)pow(3,i);
              a/=3;
              i++;
        }
    }
    printf("%lld\n",ans);
    return 0;
}

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

int a,c,t,b;

int main(void) {
	scanf("%d %d", &a, &c);
	while (a||c) {
		t*=3;
		t+=(3+c%3-a%3)%3;
		a/=3;
		c/=3;
	}
	while (t) {
		b*=3;
		b+=t%3;
		t/=3;
	}
	printf("%d\n", b);
	exit(EXIT_SUCCESS);
}

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

int a,c,t,x;

int main(void) {
	scanf("%d %d", &a, &c);
	while (a||c) {
		t*=3;
		t+=(3+c-a%3)%3;
		a/=3; c/=3;
	}
	while (t) {
		x*=3;
		x+=t%3;
		t/=3;
	}
	printf("%d\n", x);
	exit(EXIT_SUCCESS);
}

#include <stdio.h>
#include <math.h>

void change_base (int a, int arr[], int base) {
    int orig=a;
    int i,pow=1;
    int max = floor(log(orig)/log(base));
    printf ("max=%d\n",max);
    for (i=0;i<max+1;i++) {
        printf("a=%d pow=%d\n",a,pow);
        arr[i]=a%3;
        a/=3;
        pow*=3;
    }
}

void print_array (int a[], int len) {
    int i;
    for (i=0;i<len;i++) {
        printf ("%d ",a[i]);
    }
    printf ("\n");
}

int main (void) {

    int a,c;
    scanf ("%d %d",&a,&c);

    int a3[20]={0};
    change_base(a,a3,3);
    int c3[20]={0};
    change_base(c,c3,3);

    int b=0;
    int b3[19]={0};
    int i;
    for (i=0;i<19;i++) {
        b3[i]=(c3[i]-a3[i]+3)%3; // c mods negatives weirdly
        b+=pow(3,i)*b3[i];
    }
    print_array (a3,20);
    print_array (c3,20);
    print_array (b3,20);
    printf ("%d\n",b);
    return 0;
}

#include<stdio.h>
long long int dk(long long int m,long long int n[]);
long long int main()
{
long long int a,b,c,d=0,i,e=0,k=0,g=0;
long long int p[10000]={0},q[10000],f[10000];
scanf("%I64d%I64d",&a,&c);
d=dk(a,p);
e=dk(c,q);
if(d==e)
{
next:
for(i=0;i<d;i++)
{
k=0;
while(((p[i]+k)%3)!=q[i])
{
k++;
}
f[i]=k;
}
}
else
{
if(d>e)
{
while(d!=e)
{
q[e]=0;
e++;
}
goto next;}
else
{
while(d!=e)
{
p[d]=0;
d++;
}
goto next;}
}
for(i=0;i<d;i++)
{
g=g+f[i]*pow(3,i);
}
printf("%I64d",g);
return(0);
}
long long int dk(long long int m,long long int n[])
{
    int x=0;
while(m>0)
{
n[x++]=m%3;
m=(m-(m%3))/30;
}
return(x);
}