#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int main()
{
	ll t;
	cin>>t;
	while(t--)
	{
		ll  n,x;
		cin>>n>>x;
		ll arr[n];
		ll odd=0,even=0;
		for(ll i=0;i<n;i++)
		{
			cin>>arr[i];
			if(arr[i]%2==0)even++;
			else odd++;
		}
		if(x%2==0)
		{
			if(even>0 && odd>=x-1)cout<<"Yes"<<endl;
			else cout<<"No"<<endl;
		}
		else
		{
			if(odd>=x ||(odd%2!=0 && even>0))cout<<"Yes"<<endl;
			else cout<<"No"<<endl;
		}
	}
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int main()
{
	ll t;
	cin>>t;
	while(t--)
	{
		ll  n,x;
		cin>>n>>x;
		ll arr[n];
		//vector<ll>dig(1010);
		ll odd=0,even=0;
		for(ll i=0;i<n;i++)
		{
			cin>>arr[i];
			//dig[arr[i]]++;
			if(arr[i]%2==0)even++;
			else odd++;

		}
		//cout<<even<<" "<<odd<<endl;
		if(odd==0)cout<<"No"<<endl;
		else if(x%2==0)
		{
			if(even>0 && odd>=x-1)cout<<"Yes"<<endl;
			else cout<<"No"<<endl;
		}
		else
		{
			if(odd>=x)cout<<"Yes"<<endl;
			else if(odd%2==0 && even+odd-1>=x)cout<<"Yes"<<endl;
			else if(odd%2!=0 && even>=x-odd)cout<<"Yes"<<endl;
			else cout<<"No"<<endl;
		}
	}
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int main()
{
	ll t;
	cin>>t;
	while(t--)
	{
		ll  n,x;
		cin>>n>>x;
		ll arr[n];
		vector<ll>dig(1010);
		ll odd=0,even=0;
		for(ll i=0;i<n;i++)
		{
			cin>>arr[i];
			dig[arr[i]]++;
			if(arr[i]%2==0)even++;
			else if(dig[arr[i]]==1)odd++;
			else
			{
				if(dig[arr[i]]%2==0) even++;
				else odd++;
			}

		}
		if(x%2==0)
		{
			if(even>0 && odd>=x-1)cout<<"Yes"<<endl;
			else cout<<"No"<<endl;
		}
		else
		{
			if(odd>=x ||(odd%2!=0 && even>0))cout<<"Yes"<<endl;
			else cout<<"No"<<endl;
		}
	}
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int main()
{
	ll t;
	cin>>t;
	while(t--)
	{
		ll  n,x;
		cin>>n>>x;
		ll arr[n];
		//vector<ll>dig(1010);
		ll odd=0,even=0;
		for(ll i=0;i<n;i++)
		{
			cin>>arr[i];
			//dig[arr[i]]++;
			if(arr[i]%2==0)even++;
			else odd++;

		}
		//cout<<even<<" "<<odd<<endl;
		if(x%2==0)
		{
			if(even>0 && odd>=x-1)cout<<"Yes"<<endl;
			else cout<<"No"<<endl;
		}
		else
		{
			if(odd>=x)cout<<"Yes"<<endl;
			else if(odd%2==0 && even+odd-1>=x)cout<<"Yes"<<endl;
			else if(odd%2!=0 && even>=x-odd)cout<<"Yes"<<endl;
			else cout<<"No"<<endl;
		}
	}
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int main()
{
	ll t;
	cin>>t;
	while(t--)
	{
		ll  n,x;
		cin>>n>>x;
		ll arr[n];
		ll odd=0,even=0;
		for(ll i=0;i<n;i++)
		{
			cin>>arr[i];
			if(arr[i]%2==0)even++;
			else odd++;
		}
		//cout<<even<<" "<<odd<<endl;
		if(odd==0)cout<<"No"<<endl;
		else if(odd>=x)
		{
			if(x%2==0)
			{
				if(even>0)cout<<"Yes"<<endl;
				else cout<<"No"<<endl;
			}
			else cout<<"Yes"<<endl;
		}
		else
		{
			if(odd%2==0)
			{
				if(even>=x-odd+1)cout<<"Yes"<<endl;
				else  cout<<"No"<<endl;
			}
			else
			{
				if(even>=x-odd)cout<<"Yes"<<endl;
				else cout<<"No"<<endl;
			}
		}
	}
	return 0;
}


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

int solve()
{
        int n,x;
        cin>>n>>x;
        int a[n];
        for(int i=0;i<n;i++)
        {
            cin>>a[i];
        }
        int ce=0,co=0;
        for(int i=0;i<n;i++)
        {
            if(a[i]%2==0)
            {
                ce++;
            }else co++;
        }
        if(co==0)
        {
            cout<<"no"<<"\n";
            return 0;
        }
        int fl=0;
        if(co%2==0)
        {
            fl=1;
        }
        if(x<=ce+1)
        {
            cout<<"yes"<<"\n";
            return 0;
        }
        if(fl==0)
        {
            if(x<=ce+co)
            {
              cout<<"yes"<<"\n";
                return 0;
            }
        }
        x=x-ce;
        if(x>0)
        {
            if(x<co)
            {
                cout<<"yes"<<"\n";return 0;
            }
            else{
                if(x==co && co%2==1)
                {
                    cout<<"yes"<<"\n";return 0;
                }
            }
            return 0 ;
        }
        else{
            cout<<"no"<<"\n";
            return 0;
        }
}

int main()
{
    int t;cin>>t;
    while(t--)
    {
        int p=solve();
    }
}


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

int main()
{
    int t;cin>>t;
    while(t--)
    {
        int n,x;
        cin>>n>>x;
        int a[n];
        for(int i=0;i<n;i++)
        {
            cin>>a[i];
        }
        int ce=0,co=0;
        for(int i=0;i<n;i++)
        {
            if(a[i]%2==0)
            {
                ce++;
            }else co++;
        }
        if(co==0)
        {
            cout<<"no"<<"\n";
            continue;
        }
        int fl=0;
        if((co-1)%2==0)
        {
            fl=1;
        }
        if(x<=ce+1)
        {
            cout<<"yes"<<"\n";
            continue;
        }
        if(fl==1)
        {
            if(x<=ce+1+co-1)
            {
              cout<<"yes"<<"\n";
                continue;
            }
        }else{
            cout<<"no"<<"\n";
            continue;
        }

    }
}


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

int main()
{
    int t;cin>>t;
    while(t--)
    {
        int n,x;
        cin>>n>>x;
        int a[n];
        for(int i=0;i<n;i++)
        {
            cin>>a[i];
        }
        int ce=0,co=0;
        for(int i=0;i<n;i++)
        {
            if(a[i]%2==0)
            {
                ce++;
            }else co++;
        }
        if(co==0)
        {
            cout<<"no"<<"\n";
            continue;
        }
        int fl=0;
        if(co%2==0)
        {
            fl=1;
        }
        if(x<=ce+1)
        {
            cout<<"yes"<<"\n";
            continue;
        }
        if(fl==0)
        {
            if(x<=ce+co)
            {
              cout<<"yes"<<"\n";
                continue;
            }
        }
        x=x-ce;
        if(x>0)
        {
            if(x<co)
            {
                cout<<"yes"<<"\n";
                continue;
            }
            else{
                if(co%2==1)
                {
                    cout<<"yes"<<"\n";
                    continue;
                }
            }
        }
        else{
            cout<<"no"<<"\n";
            continue;
        }

    }
}


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

int solve()
{
        int n,x;
        cin>>n>>x;
        int a[n];
        for(int i=0;i<n;i++)
        {
            cin>>a[i];
        }
        int ce=0,co=0;
        for(int i=0;i<n;i++)
        {
            if(a[i]%2==0)
            {
                ce++;
            }else co++;
        }
        if(co==0)
        {
            cout<<"no"<<"\n";
            return 0;
        }
        int fl=0;
        if(co%2==0)
        {
            fl=1;
        }
        if(x<=ce+1)
        {
            cout<<"yes"<<"\n";
            return 0;
        }
        if(fl==0)
        {
            if(x<=ce+co)
            {
              cout<<"yes"<<"\n";
                return 0;
            }
        }
        x=x-ce;
        if(x>0)
        {
            if(x<co)
            {
                cout<<"yes"<<"\n";return 0;
            }
            else{
                if(x==co && co%2==1)
                {
                    cout<<"yes"<<"\n";return 0;
                }
            }
            cout<<"no"<<"\n";
            return 0;
        }
        else{
            cout<<"no"<<"\n";
            return 0;
        }
}

int main()
{
    int t;cin>>t;
    while(t--)
    {
        int p=solve();
    }
}


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

int main()
{
    int t;cin>>t;
    while(t--)
    {
        int n,x;
        cin>>n>>x;
        int a[n];
        for(int i=0;i<n;i++)
        {
            cin>>a[i];
        }
        int ce=0,co=0;
        for(int i=0;i<n;i++)
        {
            if(a[i]%2==0)
            {
                ce++;
            }else co++;
        }
        if(co==0)
        {
            cout<<"no"<<"\n";
            continue;
        }
        int fl=0;
        if(co%2==0)
        {
            fl=1;
        }
        if(x<=ce+1)
        {
            cout<<"yes"<<"\n";
            continue;
        }
        if(fl==0)
        {
            if(x<=ce+co)
            {
              cout<<"yes"<<"\n";
                continue;
            }
        }

        else{
            cout<<"no"<<"\n";
            continue;
        }

    }
}


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

int solve()
{
        int n,x;
        cin>>n>>x;
        int a[n];
        for(int i=0;i<n;i++)
        {
            cin>>a[i];
        }
        int ce=0,co=0;
        for(int i=0;i<n;i++)
        {
            if(a[i]%2==0)
            {
                ce++;
            }else co++;
        }
        if(co==0)
        {
            cout<<"no"<<"\n";
            return 0;
        }
        int fl=0;
        if(co%2==0)
        {
            fl=1;
        }
        if(x<=ce+1)
        {
            cout<<"yes"<<"\n";
            return 0;
        }
        if(fl==0)
        {
            if(x<=ce+co)
            {
              cout<<"yes"<<"\n";
                return 0;
            }
        }
        x=x-ce;
        if(x>0)
        {
            if(x<co)
            {
                cout<<"yes"<<"\n";return 0;
            }
            else{
                if(x==co && co%2==1)
                {
                    cout<<"yes"<<"\n";return 0;
                }
            }
        }
        else{
            cout<<"no"<<"\n";
            return 0;
        }
}

int main()
{
    int t;cin>>t;
    while(t--)
    {
        int p=solve();
    }
}


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

int main()
{
    int t;cin>>t;
    while(t--)
    {
        int n,x;
        cin>>n>>x;
        int a[n];
        for(int i=0;i<n;i++)
        {
            cin>>a[i];
        }
        int ce=0,co=0;
        for(int i=0;i<n;i++)
        {
            if(a[i]%2==0)
            {
                ce++;
            }else co++;
        }
        if(co==0)
        {
            cout<<"no"<<"\n";
            continue;
        }
        int fl=0;
        if(co%2==0)
        {
            fl=1;
        }
        if(x<=ce+1)
        {
            cout<<"yes"<<"\n";
            continue;
        }
        if(fl==0)
        {
            if(x<=ce+co)
            {
              cout<<"yes"<<"\n";
                continue;
            }
        }
        x=x-ce;
        if(x>0)
        {
            if(x<co)
            {
                cout<<"yes"<<"\n";
                //continue;
            }
            else{
                if(co%2==1)
                {
                    cout<<"yes"<<"\n";
                    //continue;
                }
            }
        }
        else{
            cout<<"no"<<"\n";
        }

    }
}


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

int solve()
{
        int n,x;
        cin>>n>>x;
        int a[n];
        for(int i=0;i<n;i++)
        {
            cin>>a[i];
        }
        int ce=0,co=0;
        for(int i=0;i<n;i++)
        {
            if(a[i]%2==0)
            {
                ce++;
            }else co++;
        }
        if(co==0)
        {
            cout<<"no"<<"\n";
            return 0;
        }
        if(ce==0)
        {
            if(x%2==0)
            {
                cout<<"no"<<"\n";return 0;
            }
        }
        int fl=0;
        if(co%2==0)
        {
            fl=1;
        }
        if(x<=ce+1)
        {
            cout<<"yes"<<"\n";
            return 0;
        }
        if(fl==0)
        {
            if(x<=ce+co)
            {
              cout<<"yes"<<"\n";
                return 0;
            }
        }
        x=x-ce;
        if(x>0)
        {
            if(x<co)
            {
                cout<<"yes"<<"\n";return 0;
            }
            else{
                if(x==co && co%2==1)
                {
                    cout<<"yes"<<"\n";return 0;
                }
            }
            cout<<"no"<<"\n";
            return 0;
        }
        else{
            cout<<"no"<<"\n";
            return 0;
        }
}

int main()
{
    int t;cin>>t;
    while(t--)
    {
        int p=solve();
    }
}


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

int solve()
{
        int n,x;
        cin>>n>>x;
        int a[n];
        for(int i=0;i<n;i++)
        {
            cin>>a[i];
        }
        int ce=0,co=0;
        for(int i=0;i<n;i++)
        {
            if(a[i]%2==0)
            {
                ce++;
            }else co++;
        }
        if(co==0)
        {
            cout<<"no"<<"\n";
            return 0;
        }
        if(x<co)
        {
            cout<<"yes"<<"\n";
            return 0;
        }
        if(x==co)
        {
            if(co%2==1)
            {
                cout<<"yes"<<"\n";
                return 0;
            }else{
                 cout<<"no"<<"\n";
                return 0;
            }
        }
        int fl=0;
        if(co%2==0)
        {
            fl=1;
        }
        if(x<=ce+1)
        {
            cout<<"yes"<<"\n";
            return 0;
        }
        if(fl==0)
        {
            if(x<=ce+co)
            {
              cout<<"yes"<<"\n";
                return 0;
            }
        }
        x=x-ce;
        if(x>0)
        {
            if(x<co)
            {
                cout<<"yes"<<"\n";return 0;
            }
            else{
                if(x==co && co%2==1)
                {
                    cout<<"yes"<<"\n";return 0;
                }
            }
            cout<<"no"<<"\n";
            return 0;
        }
        else{
            cout<<"no"<<"\n";
            return 0;
        }
}

int main()
{
    int t;cin>>t;
    while(t--)
    {
        int p=solve();
    }
}


#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int maxn=5e5+13;
int a[maxn];
int main()
{
	int n,t;
	scanf("%d",&t);
	while(t--)
	{
		int n,x,l;
		scanf("%d%d",&n,&x);
		int od=0,en=0;//奇偶
		for(int i=1;i<=n;i++)
		{
			scanf("%d",&a[i]);
			if(a[i]%2) od++;
			else en++;
		}
		if(od%2==0)
		{
			od-=1;
		}
		if(x-od<=en)
		{
			printf("YES\n");
		 }
		 else printf("NO\n");
	}
}


#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int maxn=5e5+13;
int main()
{
	int t;
	scanf("%d",&t);
	while(t--)
	{
		int n,x,l;
		scanf("%d%d",&n,&x);
		int od=0,en=0;//奇偶
		for(int i=1;i<=n;i++)
		{
			scanf("%d",&l);
			if(l%2==0) en++;
			else od++;
		}
		if(x<=od)
		{
			if(x%2==0)
			{
				if(en<1)
				{
					printf("No\n");
				}
				else printf("Yes\n");
			}
			else printf("Yes\n");
		}
		else
		{
			if(od%2==0) od--;
			if(x-od<=en&&od!=-1) printf("Yes\n");
			else printf("No\n");
		}
	}
}


#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int maxn=5e5+13;
int main()
{
	int t;
	scanf("%d",&t);
	while(t--)
	{
		int n,x,l;
		scanf("%d%d",&n,&x);
		int od=0,en=0;//奇偶
		for(int i=1;i<=n;i++)
		{
			scanf("%d",&l);
			if(l%2==0) en++;
			else od++;
		}
		if(x<=od)
		{
			if(x%2==0)
			{
				if(en==0)
				{
					printf("No\n");
				}
				else printf("Yes\n");
			}
			else printf("Yes\n");
		}
		else
		{
			if(od%2==0) od--;
			if(x-od<=en) printf("Yes\n");
			else printf("No\n");
		}
	}
}


#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int maxn=5e5+13;
int main()
{
	int n,t;
	scanf("%d",&t);
	while(t--)
	{
		int n,x,l;
		scanf("%d%d",&n,&x);
		int od=0,en=0;
		for(int i=1;i<=n;i++)
		{
			scanf("%d",&l);
			if(l%2) od++;
			else en++;
		}
		if(od%2==0)
		{
			od-=1;
		}
		if(x-od<=en)
		{
			printf("YES\n");
		 }
		 else printf("NO\n");
	}
}


#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int maxn=5e5+13;
int main()
{
	int t;
	scanf("%d",&t);
	while(t--)
	{
		int n,x,l;
		scanf("%d%d",&n,&x);
		int od=0,en=0;//奇偶
		for(int i=1;i<=n;i++)
		{
			scanf("%d",&l);
			if(l&1) en++;
			else od++;
		}
		if(x<=od)
		{
			if(x&1)
			{
				if(en==0)
				{
					printf("No\n");
				}
				else printf("Yes\n");
			}
			else printf("Yes\n");
		}
		else
		{
			if(od&1) od--;
			if(x-od<=en) printf("Yes\n");
			else printf("No\n");
		}
	}
}


#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int maxn=5e5+13;
int a[maxn];
int main()
{
	int n,t;
	scanf("%d",&t);
	while(t--)
	{
		int n,x,l;
		scanf("%d%d",&n,&x);
		int od=0,en=0;//奇偶
		for(int i=1;i<=n;i++)
		{
			scanf("%d",&a[i]);
			if(a[i]%2) od++;
			else en++;
		}
		if(x<=od)
		{
			if(x%2==0)
			{
				x-=1;
				if(en==0)
				{
					printf("NO\n");
				}
				else printf("YES\n");
			}
			else printf("YES\n");
		}
		else
		{
			if(od%2==0) od--;
			if(x-od<=en) printf("YES\n");
			else printf("NO\n");
		}
	}
}


#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int maxn=5e5+13;
int a[maxn];
int main()
{
	int t;
	scanf("%d",&t);
	while(t--)
	{
		int n,x,l;
		scanf("%d%d",&n,&x);
		int od=0,en=0;//奇偶
		for(int i=1;i<=n;i++)
		{
			scanf("%d",&a[i]);
			if(a[i]%2==1) od++;
			else en++;
		}
		if(x<=od)
		{
			if(x%2==0)
			{
				if(en==0)
				{
					printf("No\n");
				}
				else printf("Yes\n");
			}
			else printf("Yes\n");
		}
		else
		{
			if(od%2==0) od--;
			if(x-od<=en) printf("Yes\n");
			else printf("No\n");
		}
	}
}


#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int maxn=5e5+13;
int main()
{
	int t;
	scanf("%d",&t);
	while(t--)
	{
		int n,x,l;
		scanf("%d%d",&n,&x);
		int od=0,en=0;//奇偶
		for(int i=1;i<=n;i++)
		{
			scanf("%d",&l);
			if(l%2==0) en++;
			else od++;
		}
		if(x<=od)
		{
			if(x%2==0)
			{
				if(en<1)
				{
					printf("No\n");
				}
				else printf("Yes\n");
			}
			else printf("Yes\n");
		}
		else
		{
			if(od%2==0) od--;
			if(x-od<=en) printf("Yes\n");
			else printf("No\n");
		}
	}
}


#include <cstdio>

using namespace std;

int main()
{
    int t, n, x, count;
    scanf("%d", &t);

    for(int i = 0; i < t; ++i)
    {
        count = 0;
        scanf("%d%d", &n, &x);
        int p;

        for(int j = 0; j < n; ++j)
        {
            scanf("%d", &p);
            if(p%2)
                ++count;
        }

        if(count == 0)
        {
            printf("No\n");
            continue;
        }

        if(count%2)//count odd
        {
            if(x%2)//x odd
                printf("Yes\n");
            else//x even
            {
                if(count == n)
                    printf("No\n");
                else
                    printf("Yes\n");
            }
        }
        else//count even
        {
            if((x + 1)%2)//x even
            {
                if(x == count && count < n)
                    printf("Yes\n");
                else
                    printf("No\n");
            }
            else//x odd
            {
                if(x == n)
                    printf("No\n");
                else
                    printf("Yes\n");
            }
        }
    }
}


#include <cstdio>

using namespace std;

int main()
{
    int t, n, x, count;
    scanf("%d", &t);

    for(int i = 0; i < t; ++i)
    {
        count = 0;
        scanf("%d%d", &n, &x);
        int p;

        for(int j = 0; j < n; ++j)
        {
            scanf("%d", &p);
            if(p%2)
                ++count;
        }

        if(count == 0)
        {
            printf("No\n");
            continue;
        }

        if(count%2)//count odd
        {
            if(x%2)//x odd
                printf("Yes\n");
            else//x even
            {
                if(count == n)
                    printf("No\n");
                else
                    printf("Yes\n");
            }
        }
        else//count even
        {
            if((x + 1)%2)//x even
            {
                if(x <= count && count < n)
                    printf("Yes\n");
                else
                    printf("No\n");
            }
            else//x odd
            {
                if(x == n && x >= count)
                    printf("No\n");
                else
                    printf("Yes\n");
            }
        }
    }
}


#include <cstdio>

using namespace std;

int main()
{
    int t, n, x, count = 0;
    scanf("%d", &t);

    for(int i = 0; i < t; ++i)
    {
        scanf("%d%d", &n, &x);
        int p;
        for(int j = 0; j < n; ++j)
        {
            scanf("%d", p)
            if(p%2)
                ++count;
        }

        if(count%2)//odd num of odd
        {
            if(x%2)
                printf("Yes");
            else
            {
                if(count == n)
                    printf("No");
                else
                    printf("Yes");
            }
        }
        else//even num of odd
        {
            if(!(x%2))
            {
                if(x == n)
                    printf("No");
                else
                    printf("Yes");
            }
            else
            {
                if(x == n)
                    printf("No");
                else
                    printf("Yes");
            }
        }
    }

}


#include <cstdio>

using namespace std;

int main()
{
    int t, n, x, count;
    scanf("%d", &t);

    for(int i = 0; i < t; ++i)
    {
        count = 0;
        scanf("%d%d", &n, &x);
        int p;

        for(int j = 0; j < n; ++j)
        {
            scanf("%d", &p);
            if(p%2)
                ++count;
        }

        if(count == 0)
        {
            printf("No\n");
            continue;
        }

        int numEven2 = (--count)/2;
        --x;

        while(numEven2--)
        {
            if(x < 2) break;
            x -= 2;
        }

        n = n - count - 1;
        while(n--)
        {
            if(x < 1) break;
            --x;
        }

        if(x == 0)
        {
            printf("Yes");
            continue;
        }

        printf("No");

    }
}


#include <cstdio>

using namespace std;

int main()
{
    int t, n, x, count;
    scanf("%d", &t);

    for(int i = 0; i < t; ++i)
    {
        count = 0;
        scanf("%d%d", &n, &x);
        int p;

        for(int j = 0; j < n; ++j)
        {
            scanf("%d", &p);
            if(p%2)
                ++count;
        }

        if(count == 0)
        {
            printf("No\n");
            continue;
        }

        if(count%2)//count odd
        {
            if(x%2)//x odd
                printf("Yes\n");
            else//x even
            {
                if(count == n)
                    printf("No\n");
                else
                    printf("Yes\n");
            }
        }
        else//count even
        {
            if((x + 1)%2)//x even
            {
                if(count < n)
                    printf("Yes\n");
                else
                    printf("No\n");
            }
            else//x odd
            {
                if(x == n)
                    printf("No\n");
                else
                    printf("Yes\n");
            }
        }
    }
}


#include <cstdio>

using namespace std;

int main()
{
    int t, n, x, count;
    scanf("%d", &t);

    for(int i = 0; i < t; ++i)
    {
        count = 0;
        scanf("%d%d", &n, &x);
        int p;
        for(int j = 0; j < n; ++j)
        {
            scanf("%d", &p);
            if(p%2)
                ++count;
        }

        if(count == 0)
        {
            printf("No\n");
            continue;
        }

        if(count%2)//count odd
        {
            if(x%2)//x odd
                printf("Yes\n");
            else//x even
            {
                if(count == n)
                    printf("No\n");
                else
                    printf("Yes\n");
            }
        }
        else//count even
        {
            if((x + 1)%2)//x even
            {
                if(x <= count && count < n)
                    printf("Yes\n");
                else
                    printf("No\n");
            }
            else//x odd
            {
                if(x == n)
                    printf("No\n");
                else
                    printf("Yes\n");
            }
        }
    }
}


#include <cstdio>

using namespace std;

int main()
{
    int t, n, x, count;
    scanf("%d", &t);

    for(int i = 0; i < t; ++i)
    {
        count = 0;
        scanf("%d%d", &n, &x);
        int p;

        for(int j = 0; j < n; ++j)
        {
            scanf("%d", &p);
            if(p%2)
                ++count;
        }

        if(count == 0)
        {
            printf("No\n");
            continue;
        }

        if(count%2)//count odd
        {
            if(x%2)//x odd
                printf("Yes\n");
            else//x even
            {
                if(count == n)
                    printf("No\n");
                else
                    printf("Yes\n");
            }
        }
        else//count even
        {
            if((x + 1)%2)//x even
            {
                if(x <= count && count < n)
                    printf("Yes\n");
                else
                    printf("No\n");
            }
            else//x odd
            {
                if(x == n && x > count)
                    printf("No\n");
                else
                    printf("Yes\n");
            }
        }
    }
}


#include <cstdio>

using namespace std;

int main()
{
    int t, n, x, count;
    scanf("%d", &t);

    for(int i = 0; i < t; ++i)
    {
        count = 0;
        scanf("%d%d", &n, &x);
        int p;
        for(int j = 0; j < n; ++j)
        {
            scanf("%d", &p);
            if(p%2)
                ++count;
        }

        if(count%2)//odd num of odd
        {
            if(x%2)
                printf("Yes\n");
            else
            {
                if(count == n || (x + 1)%2)
                    printf("No\n");
                else
                    printf("Yes\n");
            }
        }
        else//even num of odd
        {
            if((x + 1)%2)
            {
                if(x == n || (x + 1)%2)
                    printf("No\n");
                else
                    printf("Yes\n");
            }
            else
            {
                if(x == n || (x + 1)%2)
                    printf("No\n");
                else
                    printf("Yes\n");
            }
        }
    }
}


#include <cstdio>

using namespace std;

int main()
{
    int t, n, x, count = 0;
    scanf("%d", &t);

    for(int i = 0; i < t; ++i)
    {
        scanf("%d%d", &n, &x);
        int p;
        for(int j = 0; j < n; ++j)
        {
            scanf("%d", &p);
            if(p%2)
                ++count;
        }

        if(count%2)//odd num of odd
        {
            if(x%2)
                printf("Yes\n");
            else
            {
                if(count == n)
                    printf("No\n");
                else
                    printf("Yes\n");
            }
        }
        else//even num of odd
        {
            if((x + 1)%2)
            {
                if(x == n)
                    printf("No\n");
                else
                    printf("Yes\n");
            }
            else
            {
                if(x == n)
                    printf("No\n");
                else
                    printf("Yes\n");
            }
        }
    }

}


#include <cstdio>

using namespace std;

int main()
{
    int t, n, x, count;
    scanf("%d", &t);

    for(int i = 0; i < t; ++i)
    {
        count = 0;
        scanf("%d%d", &n, &x);
        int p;

        for(int j = 0; j < n; ++j)
        {
            scanf("%d", &p);
            if(p%2)
                ++count;
        }

        if(count == 0)
        {
            printf("No\n");
            continue;
        }

        numEven2 = (--count)/2;
        --x;

        while(numEven2--)
        {
            if(x < 2) break;
            x -= 2;
        }

        while((n - count - 1)--)
        {
            if(x < 1) break;
            --x;
        }

        if(x == 0)
        {
            printf("Yes");
            continue;
        }

        printf("No");

    }
}


#include <cstdio>

using namespace std;

int main()
{
    int t, n, x, count;
    scanf("%d", &t);

    for(int i = 0; i < t; ++i)
    {
        count = 0;
        scanf("%d%d", &n, &x);
        int p;

        for(int j = 0; j < n; ++j)
        {
            scanf("%d", &p);
            if(p%2)
                ++count;
        }

        if(count == 0)
        {
            printf("No\n");
            continue;
        }

        if(count%2)//count odd
        {
            if(x%2)//x odd
                printf("Yes\n");
            else//x even
            {
                if(count == n)
                    printf("No\n");
                else
                    printf("Yes\n");
            }
        }
        else//count even
        {

                if(count < n)
                    printf("Yes\n");
                else
                    printf("No\n");

        }
    }
}


#include <cstdio>

using namespace std;

int main()
{
    int t, n, x, count;
    scanf("%d", &t);

    for(int i = 0; i < t; ++i)
    {
        count = 0;
        scanf("%d%d", &n, &x);
        int p;

        for(int j = 0; j < n; ++j)
        {
            scanf("%d", &p);
            if(p%2)
                ++count;
        }

        if(count == 0)
        {
            printf("No\n");
            continue;
        }

        if(count%2)//count odd
        {
            if(x%2)//x odd
                printf("Yes\n");
            else//x even
            {
                if(count == n)
                    printf("No\n");
                else
                    printf("Yes\n");
            }
        }
        else//count even
        {
            if((x + 1)%2)//x even
            {
                if(x <= count && count <= n)
                    printf("Yes\n");
                else
                    printf("No\n");
            }
            else//x odd
            {
                if(x == n)
                    printf("No\n");
                else
                    printf("Yes\n");
            }
        }
    }
}


#include <cstdio>

using namespace std;

int main()
{
    int t, n, x, count;
    scanf("%d", &t);

    for(int i = 0; i < t; ++i)
    {
        count = 0;
        scanf("%d%d", &n, &x);
        int p;

        for(int j = 0; j < n; ++j)
        {
            scanf("%d", &p);
            if(p%2)
                ++count;
        }

        if(count == 0)
        {
            printf("No\n");
            continue;
        }

        if(count%2)//count odd
        {
            if(x%2)//x odd
                printf("Yes\n");
            else//x even
            {
                if(count == n)
                    printf("No\n");
                else
                    printf("Yes\n");
            }
        }
        else//count even
        {
            if((x + 1)%2)//x even
            {
                if(x <= count && count < n)
                    printf("Yes\n");
                else
                    printf("No\n");
            }
            else//x odd
            {
                if(x == n && x < count)
                    printf("No\n");
                else
                    printf("Yes\n");
            }
        }
    }
}


#include <cstdio>

using namespace std;

int main()
{
    int t, n, x, count = 0;
    scanf("%d", &t);

    for(int i = 0; i < t; ++i)
    {
        scanf("%d%d", &n, &x);
        int p;
        for(int j = 0; j < n; ++j)
        {
            scanf("%d", &p);
            if(p%2)
                ++count;
        }

        if(count%2)//odd num of odd
        {
            if(x%2)
                printf("Yes");
            else
            {
                if(count == n)
                    printf("No");
                else
                    printf("Yes");
            }
        }
        else//even num of odd
        {
            if(!(x%2))
            {
                if(x == n)
                    printf("No");
                else
                    printf("Yes");
            }
            else
            {
                if(x == n)
                    printf("No");
                else
                    printf("Yes");
            }
        }
    }

}


#include <cstdio>

using namespace std;

int main()
{
    int t, n, x, count;
    scanf("%d", &t);

    for(int i = 0; i < t; ++i)
    {
        count = 0;
        scanf("%d%d", &n, &x);
        int p;

        for(int j = 0; j < n; ++j)
        {
            scanf("%d", &p);
            if(p%2)
                ++count;
        }

        if(count == 0)
        {
            printf("No\n");
            continue;
        }

        if(count%2)//count odd
        {
            if(x%2)//x odd
                printf("Yes\n");
            else//x even
            {
                if(count == n)
                    printf("No\n");
                else
                    printf("Yes\n");
            }
        }
        else//count even
        {
            if((x + 1)%2)//x even
            {
                if(x <= count && count < n)
                    printf("Yes\n");
                else
                    printf("No\n");
            }
            else//x odd
            {
                if(x <= n)
                    printf("No\n");
                else
                    printf("Yes\n");
            }
        }
    }
}


#include <cstdio>

using namespace std;

int main()
{
    int t, n, x, count;
    scanf("%d", &t);

    for(int i = 0; i < t; ++i)
    {
        count = 0;
        scanf("%d%d", &n, &x);
        int p;

        for(int j = 0; j < n; ++j)
        {
            scanf("%d", &p);
            if(p%2)
                ++count;
        }

        if(count == 0)
        {
            printf("No\n");
            continue;
        }

        if(count%2)//count odd
        {
            if(x%2)//x odd
                printf("Yes\n");
            else//x even
            {
                if(count == n)
                    printf("No\n");
                else
                    printf("Yes\n");
            }
        }
        else//count even
        {

                if(x <= count && count < n)
                    printf("Yes\n");
                else
                    printf("No\n");

        }
    }
}


#include <cstdio>

using namespace std;

int main()
{
    int t, n, x, count;
    scanf("%d", &t);

    for(int i = 0; i < t; ++i)
    {
        count = 0;
        scanf("%d%d", &n, &x);
        int p;

        for(int j = 0; j < n; ++j)
        {
            scanf("%d", &p);
            if(p%2)
                ++count;
        }

        if(count == 0)
        {
            printf("No\n");
            continue;
        }

        if(count%2)//count odd
        {
            if(x%2)//x odd
                printf("Yes\n");
            else//x even
            {
                if(count == n)
                    printf("No\n");
                else
                    printf("Yes\n");
            }
        }
        else//count even
        {
            if((x + 1)%2)//x even
            {
                if(x < count && count < n)
                    printf("Yes\n");
                else
                    printf("No\n");
            }
            else//x odd
            {
                if(x == n)
                    printf("No\n");
                else
                    printf("Yes\n");
            }
        }
    }
}


#include <cstdio>

using namespace std;

int main()
{
    int t, n, x, count;
    scanf("%d", &t);

    for(int i = 0; i < t; ++i)
    {
        count = 0;
        scanf("%d%d", &n, &x);
        int p;
        for(int j = 0; j < n; ++j)
        {
            scanf("%d", &p);
            if(p%2)
                ++count;
        }

        if(count%2)//count odd
        {
            if(x%2)//x odd
                printf("Yes\n");
            else//x even
            {
                if(count == n)
                    printf("No\n");
                else
                    printf("Yes\n");
            }
        }
        else//count even
        {
            if((x + 1)%2)//x even
            {
                if(x < count && count < n)
                    printf("Yes\n");
                else
                    printf("No\n");
            }
            else//x odd
            {
                if(x == n)
                    printf("No\n");
                else
                    printf("Yes\n");
            }
        }
    }
}


#include <cstdio>

using namespace std;

int main()
{
    int t, n, x, count;
    scanf("%d", &t);

    for(int i = 0; i < t; ++i)
    {
        count = 0;
        scanf("%d%d", &n, &x);
        int p;
        for(int j = 0; j < n; ++j)
        {
            scanf("%d", &p);
            if(p%2)
                ++count;
        }

        if(count == 0)
        {
            printf("No");
            continue;
        }

        if(count%2)//count odd
        {
            if(x%2)//x odd
                printf("Yes\n");
            else//x even
            {
                if(count == n)
                    printf("No\n");
                else
                    printf("Yes\n");
            }
        }
        else//count even
        {
            if((x + 1)%2)//x even
            {
                if(x <= count && count < n)
                    printf("Yes\n");
                else
                    printf("No\n");
            }
            else//x odd
            {
                if(x == n)
                    printf("No\n");
                else
                    printf("Yes\n");
            }
        }
    }
}


#include <cstdio>

using namespace std;

int main()
{
    int t, n, x, count;
    scanf("%d", &t);

    for(int i = 0; i < t; ++i)
    {
        count = 0;
        scanf("%d%d", &n, &x);
        int p;

        for(int j = 0; j < n; ++j)
        {
            scanf("%d", &p);
            if(p%2)
                ++count;
        }

        if(count == 0)
        {
            printf("No\n");
            continue;
        }

        int numEven2 = (--count)/2;
        --x;

        while(numEven2--)
        {
            if(x < 2) break;
            x -= 2;
        }

        n = n - count - 1;
        while(n--)
        {
            if(x < 1) break;
            --x;
        }

        if(x == 0)
        {
            printf("Yes\n");
            continue;
        }

        printf("No\n");

    }
}


#include <cstdio>

using namespace std;

int main()
{
    int t, n, x, count;
    scanf("%d", &t);

    for(int i = 0; i < t; ++i)
    {
        count = 0;
        scanf("%d%d", &n, &x);
        int p;
        for(int j = 0; j < n; ++j)
        {
            scanf("%d", &p);
            if(p%2)
                ++count;
        }

        if(count%2)//odd num of odd
        {
            if(x%2)
                printf("Yes\n");
            else
            {
                if(count == n)
                    printf("No\n");
                else
                    printf("Yes\n");
            }
        }
        else//even num of odd
        {
            if((x + 1)%2)
            {
                if(x == n)
                    printf("No\n");
                else
                    printf("Yes\n");
            }
            else
            {
                if(x == n)
                    printf("No\n");
                else
                    printf("Yes\n");
            }
        }
    }
}


#include <cstdio>

using namespace std;

int main()
{
    int t, n, x, count;
    scanf("%d", &t);

    for(int i = 0; i < t; ++i)
    {
        count = 0;
        scanf("%d%d", &n, &x);
        int p;
        for(int j = 0; j < n; ++j)
        {
            scanf("%d", &p);
            if(p%2)
                ++count;
        }

        if(count%2)//count odd
        {
            if(x%2)//x odd
                printf("Yes\n");
            else//x even
            {
                if(count == n)
                    printf("No\n");
                else
                    printf("Yes\n");
            }
        }
        else//count even
        {
            if((x + 1)%2)//x even
            {
                if(x <= count && count < n)
                    printf("Yes\n");
                else
                    printf("No\n");
            }
            else//x odd
            {
                if(x == n)
                    printf("No\n");
                else
                    printf("Yes\n");
            }
        }
    }
}


#include <cstdio>

using namespace std;

int main()
{
    int t, n, x, count = 0;
    scanf("%d", &t);

    for(int i = 0; i < t; ++i)
    {
        scanf("%d%d", &n, &x);
        int p;
        for(int j = 0; j < n; ++j)
        {
            scanf("%d", &p);
            if(p%2)
                ++count;
        }

        if(count%2)//odd num of odd
        {
            if(x%2)
                printf("Yes\n");
            else
            {
                if(count == n)
                    printf("No\n");
                else
                    printf("Yes\n");
            }
        }
        else//even num of odd
        {
            if(!(x%2))
            {
                if(x == n)
                    printf("No\n");
                else
                    printf("Yes\n");
            }
            else
            {
                if(x == n)
                    printf("No\n");
                else
                    printf("Yes\n");
            }
        }
    }

}


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

int main() {
    int t;
    cin >> t;
    while (t--) {
        int n, x;
        cin >> n >> x;
        int a[n], i = 0, cnt = 0;
        for (i; i < n; i++) {
            cin >> a[i];
            if (a[i] % 2 != 0) {
                cnt++;
            }
        }
        if (cnt % 2 != 0) {
            cout << "Yes" << endl;
        }
        else {
            cout << "No" << endl;
        }

    }
    return 0;
}


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

int main() {
    int t;
    cin >> t;
    while (t--) {
        int n, x;
        cin >> n >> x;
        int a[n], cnt = 0;
        for (int i = 0; i < n; i++) {
            cin >> a[i];
            if (a[i] % 2 != 0) {
                cnt++;
            }
        }

        if (cnt % 2 != 0 && (x - cnt == 0 || abs(x - cnt) % 2 != 0)) {
            cout << "Yes" << endl;
        }
        else {
            cout << "No" << endl;
        }

    }
    return 0;
}


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

int main() {
    int t;
    cin >> t;
    while (t--) {
        int n, x;
        cin >> n >> x;
        int a[n], cnt = 0;
        for (int i = 0; i < n; i++) {
            cin >> a[i];
            if (a[i] % 2 != 0) {
                cnt++;
            }
        }
        if (abs(x - cnt) % 2 != 0) {
            cout << "Yes" << endl;
        }
        else {
            cout << "No" << endl;
        }

    }
    return 0;
}


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

int main() {
    int t;
    cin >> t;
    while (t--) {
        int n, x;
        cin >> n >> x;
        int a[n], odd = 0, even = 0;
        for (int i = 0; i < n; i++) {
            cin >> a[i];
            if (a[i] % 2 != 0) {
                odd++;
            }
            else {
                even++;
            }
        }

        if (odd == 0) {
            cout << "No" << endl;
        }
        else {
           int cnt = 0;
           int begO = odd;
           odd--;
           cnt++;
           while (cnt < x) {
               if (cnt < x - 2 && odd > 1) {
                   cnt = cnt + 2;
                   odd = odd - 2;
               }
               else if (even > 0) {
                   even--;
                   cnt++;
               }
               else {
                   cnt++;
                   odd--;
               }
           }
           if ((begO - odd + 1) % 2 == 0) {
               cout << "Yes" << endl;
           }
           else {
               cout << "No" << endl;
           }
        }

    }
    return 0;
}


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

int main() {
    int t;
    cin >> t;
    while (t--) {
        int n, x;
        cin >> n >> x;
        int a[n], odd = 0, even = 0;
        for (int i = 0; i < n; i++) {
            cin >> a[i];
            if (a[i] % 2 != 0) {
                odd++;
            }
            else {
                even++;
            }
        }

        if (odd == 0) {
            cout << "No" << endl;
        }
        else {
           int cnt = 0;
           int begO = odd;
           odd--;
           cnt++;
           while (cnt < x) {
               if (cnt <= x - 2 && odd > 1) {
                   cnt = cnt + 2;
                   odd = odd - 2;
               }
               else if (even > 0) {
                   even--;
                   cnt++;
               }
               else {
                   cnt++;
                   odd--;
               }
           }
           if ((begO - odd + 1) % 2 == 0) {
               cout << "Yes" << endl;
           }
           else {
               cout << "No" << endl;
           }
        }

    }
    return 0;
}


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

int main() {
    int t;
    cin >> t;
    while (t--) {
        int n, x;
        cin >> n >> x;
        int a[n], cnt = 0;
        for (int i = 0; i < n; i++) {
            cin >> a[i];
            if (a[i] % 2 != 0) {
                cnt++;
            }
        }

        if (cnt % 2 != 0 && (x - cnt == 0 || n - cnt != 0)) {
            cout << "Yes" << endl;
        }
        else {
            cout << "No" << endl;
        }

    }
    return 0;
}


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

int main() {
    int t;
    cin >> t;
    while (t--) {
        int n, x;
        cin >> n >> x;
        int a[n], odd = 0, even = 0;
        for (int i = 0; i < n; i++) {
            cin >> a[i];
            if (a[i] % 2 != 0) {
                odd++;
            }
            else {
                even++;
            }
        }

        if (odd == 0) {
            cout << "No" << endl;
        }
        else {
            int pick = 1;
            odd--;
            while (pick < x && even > 0) {
                even--;
                pick++;
            }
            if (pick == x) {
                cout << "Yes" << endl;
            }
            else if ((x - pick) % 2 != 0) {
                cout << "No" << endl;
            }
            else {
                cout << "Yes" << endl;
            }
        }

    }
    return 0;
}


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

int main() {
    int t;
    cin >> t;
    while (t--) {
        int n, x;
        cin >> n >> x;
        int a[n], cnt = 0;
        for (int i = 0; i < n; i++) {
            cin >> a[i];
            if (a[i] % 2 != 0) {
                cnt++;
            }
        }
        if (cnt % 2 != 0) {
            cout << "Yes" << endl;
        }
        else {
            cout << "No" << endl;
        }

    }
    return 0;
}


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

int main(){

	int t;
	cin>>t;

	while(t--){

		int x,n;
		cin>>n>>x;

		int e = 0;
		int o = 0;

		vector<int> v(n);

		for(int i=0;i<n;i++){
			cin>>v[i];

			if(v[i]%2==0)
				e++;
			else
				o++;
		}

		if(o==0){
			cout<<"No"<<endl;
			continue;
		}

		if(o%2 != 1)
			o--;
		if(x<=o && x%2==1){
			cout<<"Yes"<<endl;
			continue;
		}
		if(x<=o && x&2!=1 && e>=1){
			cout<<"Yes"<<endl;
			continue;
		}
		if(x>o && (x-o)<=e){
			cout<<"Yes"<<endl;
			continue;
		}
		cout<<"No"<<endl;
	}
}


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

int main(){

	int t;
	cin>>t;

	while(t--){

		int x,n;
		cin>>n>>x;

		int e = 0;
		int o = 0;

		vector<int> v(n);

		for(int i=0;i<n;i++){
			cin>>v[i];

			if(v[i]%2==0)
				e++;
			else
				o++;
		}
		if(o==0){
			cout<<"No"<<endl;
			continue;
		}
		//cout<<o<<" "<<e<<endl;
//		if(n==1 && v[0]%2==1){
//			cout<<"Yes"<<endl;
//			continue;
//		}
//		if(n==1 && v[0]%2==0){
//			cout<<"No"<<endl;
//			continue;
//		}

		int j = 0;
		if(o%2==0)
			j = 1;
		else
			j=0;

		if(x%2==1 && x<=o){
			cout<<"Yes"<<endl;
			continue;
		}
		else{
			x = x - o + j;
			if(x<=e){
				cout<<"Yes"<<endl;
				continue;
			}
			else{
				cout<<"No"<<endl;
				continue;
			}
		}

	}
}


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

int main(){

	int t;
	cin>>t;

	while(t--){

		int x,n;
		cin>>n>>x;

		int e = 0;
		int o = 0;

		vector<int> v(n);

		for(int i=0;i<n;i++){
			cin>>v[i];

			if(v[i]%2==0)
				e++;
			else
				o++;
		}
		if(o==0){
			cout<<"No"<<endl;
			continue;
		}

		else if(x==n){
			if(o%2!=1){
				cout<<"No"<<endl;
				continue;
			}
			else{
				cout<<"Yes"<<endl;
				continue;
			}
		}

		else {
			o--;
			x--;
			if(x<=e){
				cout<<"Yes"<<endl;
				continue;
			}
			else{
				x = x-e;
				if(x%2==1){
					x--;
					if(x<=o){
					cout<<"Yes"<<endl;
					continue;
					}
					else{
					cout<<"No"<<endl;
					continue;
					}

				}
				else{
					cout<<"Yes"<<endl;
					continue;
				}
			}
		}
		//cout<<o<<" "<<e<<endl;
//		if(n==1 && v[0]%2==1){
//			cout<<"Yes"<<endl;
//			continue;
//		}
//		if(n==1 && v[0]%2==0){
//			cout<<"No"<<endl;
//			continue;
//		}

//		int j = 0;
//		if(o%2==0)
//			j = 1;
//		else
//			j=0;
//
//		if(x%2==1 && x<=o){
//			cout<<"Yes"<<endl;
//			continue;
//		}
//		else{
//			x = x - o + j;
//			if(x<=e){
//				cout<<"Yes"<<endl;
//				continue;
//			}
//			else{
//				cout<<"No"<<endl;
//				continue;
//			}
//		}

	}
}


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

int main(){

	int t;
	cin>>t;

	while(t--){

		int x,n;
		cin>>n>>x;

		int e = 0;
		int o = 0;

		vector<int> v(n);

		for(int i=0;i<n;i++){
			cin>>v[i];

			if(v[i]%2==0)
				e++;
			else
				o++;
		}
		if(o==0){
			cout<<"No"<<endl;
			continue;
		}

		else if(x==n){
			if(o%2!=1){
				cout<<"No"<<endl;
				continue;
			}
			else{
				cout<<"Yes"<<endl;
				continue;
			}
		}

		else if(o>=1){
			o--;
			x--;
			if(x<=e){
				cout<<"Yes"<<endl;
				continue;
			}
			else{
				x = x-e;
				if(x%2==1){
					cout<<"Yes"<<endl;
					continue;
				}
				else{
					cout<<"No"<<endl;
					continue;
				}
			}
		}
		//cout<<o<<" "<<e<<endl;
//		if(n==1 && v[0]%2==1){
//			cout<<"Yes"<<endl;
//			continue;
//		}
//		if(n==1 && v[0]%2==0){
//			cout<<"No"<<endl;
//			continue;
//		}

//		int j = 0;
//		if(o%2==0)
//			j = 1;
//		else
//			j=0;
//
//		if(x%2==1 && x<=o){
//			cout<<"Yes"<<endl;
//			continue;
//		}
//		else{
//			x = x - o + j;
//			if(x<=e){
//				cout<<"Yes"<<endl;
//				continue;
//			}
//			else{
//				cout<<"No"<<endl;
//				continue;
//			}
//		}

	}
}


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

int main(){

	int t;
	cin>>t;

	while(t--){

		int x,n;
		cin>>n>>x;

		int e = 0;
		int o = 0;

		vector<int> v(n);

		for(int i=0;i<n;i++){
			cin>>v[i];

			if(v[i]%2==0)
				e++;
			else
				o++;
		}

		if(o==0){
			cout<<"No"<<endl;
			continue;
		}

		if(e==0 && x%2==0)
		{
			cout<<"No"<<endl;
			continue;
		}

		if(o%2 != 1)
			o--;
		if(x<=o){
			cout<<"Yes"<<endl;
			continue;
		}
//		if(x<=o && x&2!=1 && e>=1){
//			cout<<"Yes"<<endl;
//			continue;
//		}
		if(x>o && (x-o)<=e){
			cout<<"Yes"<<endl;
			continue;
		}
		cout<<"No"<<endl;
	}
}


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

int main(){

	int t;
	cin>>t;

	while(t--){

		int x,n;
		cin>>n>>x;

		int e = 0;
		int o = 0;

		vector<int> v(n);

		for(int i=0;i<n;i++){
			cin>>v[i];

			if(v[i]%2==0)
				e++;
			else
				o++;
		}
		if(o==0){
			cout<<"No"<<endl;
			continue;
		}

//		else if(x==n){
//			if(o%2!=1){
//				cout<<"No"<<endl;
//				continue;
//			}
//			else{
//				cout<<"Yes"<<endl;
//				continue;
//			}
//		}
//
		else {
			o--;
			x--;
			if(x<=e){
				cout<<"Yes"<<endl;
				continue;
			}
			else{
				x = x-e;
				if(x%2==1){
					cout<<"No"<<endl;
					continue;
				}
				else{
					cout<<"Yes"<<endl;
					continue;
				}
			}
		}
		//cout<<o<<" "<<e<<endl;
//		if(n==1 && v[0]%2==1){
//			cout<<"Yes"<<endl;
//			continue;
//		}
//		if(n==1 && v[0]%2==0){
//			cout<<"No"<<endl;
//			continue;
//		}

//		int j = 0;
//		if(o%2==0)
//			j = 1;
//		else
//			j=0;
//
//		if(x%2==1 && x<=o){
//			cout<<"Yes"<<endl;
//			continue;
//		}
//		else{
//			x = x - o + j;
//			if(x<=e){
//				cout<<"Yes"<<endl;
//				continue;
//			}
//			else{
//				cout<<"No"<<endl;
//				continue;
//			}
//		}

	}
}


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

int main(){

	int t;
	cin>>t;

	while(t--){

		int x,n;
		cin>>n>>x;

		int e = 0;
		int o = 0;

		vector<int> v(n);

		for(int i=0;i<n;i++){
			cin>>v[i];

			if(v[i]%2==0)
				e++;
			else
				o++;
		}

		if(o%2 != 1)
			o--;
		if(x<=o && x%2==1){
			cout<<"Yes"<<endl;
			continue;
		}
		if(x<=0 && x&2!=1 && e>=1){
			cout<<"Yes"<<endl;
			continue;
		}
		if(x>o && (x-o)<=e){
			cout<<"Yes"<<endl;
			continue;
		}
		cout<<"No"<<endl;
	}
}


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

int main(){

	int t;
	cin>>t;

	while(t--){

		int x,n;
		cin>>n>>x;

		int e = 0;
		int o = 0;

		vector<int> v(n);

		for(int i=0;i<n;i++){
			cin>>v[i];

			if(v[i]%2==0)
				e++;
			else
				o++;
		}
		//cout<<o<<" "<<e<<endl;
//		if(n==1 && v[0]%2==1){
//			cout<<"Yes"<<endl;
//			continue;
//		}
//		if(n==1 && v[0]%2==0){
//			cout<<"No"<<endl;
//			continue;
//		}

		int j = 0;
		if(o%2==0)
			j = 1;
		else
			j=0;

		if(x%2==1 && x<=o){
			cout<<"Yes"<<endl;
			continue;
		}
		else{
			x = x - o + j;
			if(x<=e){
				cout<<"Yes"<<endl;
				continue;
			}
			else{
				cout<<"No"<<endl;
				continue;
			}
		}

	}
}


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

int main(){

	int t;
	cin>>t;

	while(t--){

		int x,n;
		cin>>n>>x;

		int e = 0;
		int o = 0;

		vector<int> v(n);

		for(int i=0;i<n;i++){
			cin>>v[i];

			if(v[i]%2==0)
				e++;
			else
				o++;
		}

		if(o%2 != 1)
			o--;
		if(x<=o && x%2==1){
			cout<<"Yes"<<endl;
			continue;
		}
		if(x<=o && x&2!=1 && e>=1){
			cout<<"Yes"<<endl;
			continue;
		}
		if(x>o && (x-o)<=e){
			cout<<"Yes"<<endl;
			continue;
		}
		cout<<"No"<<endl;
	}
}


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

int main(){

	int t;
	cin>>t;

	while(t--){

		int x,n;
		cin>>n>>x;

		int e = 0;
		int o = 0;

		vector<int> v(n);

		for(int i=0;i<n;i++){
			cin>>v[i];

			if(v[i]%2==0)
				e++;
			else
				o++;
		}

		if(o==0){
			cout<<"No"<<endl;
			continue;
		}

		if(o%2 != 1)
			o--;
		if(x<=o){
			cout<<"Yes"<<endl;
			continue;
		}
//		if(x<=o && x&2!=1 && e>=1){
//			cout<<"Yes"<<endl;
//			continue;
//		}
		if(x>o && (x-o)<=e){
			cout<<"Yes"<<endl;
			continue;
		}
		cout<<"No"<<endl;
	}
}


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

int main(){

	int t;
	cin>>t;

	while(t--){

		int x,n;
		cin>>n>>x;

		int e = 0;
		int o = 0;

		vector<int> v(n);

		for(int i=0;i<n;i++){
			cin>>v[i];

			if(v[i]%2==0)
				e++;
			else
				o++;
		}
		if(o==0){
			cout<<"No"<<endl;
			continue;
		}

		else if(x==n){
			if(o%2!=1){
				cout<<"No"<<endl;
				continue;
			}
			else{
				cout<<"Yes"<<endl;
				continue;
			}
		}

		else {
			o--;
			x--;
			if(x<=e){
				cout<<"Yes"<<endl;
				continue;
			}
			else{
				x = x-e;
				if(x%2==1){
					x++;
					if(x<=o){
					cout<<"Yes"<<endl;
					continue;
					}
					else{
					cout<<"No"<<endl;
					continue;
					}

				}
				else{
					cout<<"Yes"<<endl;
					continue;
				}
			}
		}
		//cout<<o<<" "<<e<<endl;
//		if(n==1 && v[0]%2==1){
//			cout<<"Yes"<<endl;
//			continue;
//		}
//		if(n==1 && v[0]%2==0){
//			cout<<"No"<<endl;
//			continue;
//		}

//		int j = 0;
//		if(o%2==0)
//			j = 1;
//		else
//			j=0;
//
//		if(x%2==1 && x<=o){
//			cout<<"Yes"<<endl;
//			continue;
//		}
//		else{
//			x = x - o + j;
//			if(x<=e){
//				cout<<"Yes"<<endl;
//				continue;
//			}
//			else{
//				cout<<"No"<<endl;
//				continue;
//			}
//		}

	}
}


#include <bits/stdc++.h>

using namespace std;

int main(){
    int n,i,a,b,j,x,par=0,imp=0;
    cin>>n;
    for(i=0;i<n;i++){
        cin>>a>>b;
        for(j=0;j<a;j++){
            cin>>x;
            if(x%2==0){
                par++;

            }else{
                imp++;

            }

        }
        if (b%2==0){
            if(b<imp || par>0){
                 cout<<"Yes"<<endl;
            }else{
                cout<<"No";
            }
        }else{
            if (imp%2!=0){
                cout<<"Yes"<<endl;
            }else {
                cout<<"No"<<endl;
            }
        }
        par=0;
        imp=0;

    }
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

int main(){
    int n,i,a,b,j,x,par=0,imp=0;
    cin>>n;
    for(i=0;i<n;i++){
        cin>>a>>b;
        for(j=0;j<a;j++){
            cin>>x;
            if(x%2==0){
                par++;

            }else{
                imp++;

            }

        }
        bool band =false;
        if (imp%2==0){
            if(imp-1+par>=b){
                band= true;
            }
        }else{
            band= true;
        }

        if(band)cout<<"Yes"<<endl;
        else cout<<"No"<<endl;

        par=0;
        imp=0;

    }
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

int main(){
    int n,i,a,b,j,x,par=0,imp=0;
    cin>>n;
    for(i=0;i<n;i++){
        cin>>a>>b;
        for(j=0;j<a;j++){
            cin>>x;
            if(x%2==0){
                par++;

            }else{
                imp++;

            }

        }
        bool band =false;
        if (imp%2==0){
            if(imp-1+par>=b){
                band= true;
            }
        }else{
            band= true;
        }

        if (par==0 and b%2==0) band=false;
        if(band)cout<<"Yes"<<endl;
        else cout<<"No"<<endl;

        par=0;
        imp=0;

    }
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

int main(){
    int n,i,a,b,j,x,par=0,imp=0;
    cin>>n;
    for(i=0;i<n;i++){
        cin>>a>>b;
        for(j=0;j<a;j++){
            cin>>x;
            if(x%2==0){
                par++;

            }else{
                imp++;

            }

        }
        if (b%2==0){
            if(b<imp || par>0){
                 cout<<"Yes"<<endl;
            }else{
                cout<<"No";
            }
        }else{
            if (imp>0){
                cout<<"Yes"<<endl;
            }
            else {
                cout<<"No"<<endl;
            }
        }
        par=0;
        imp=0;

    }
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

int main(){
    int n,i,a,b,j,x,par=0,imp=0;
    cin>>n;
    for(i=0;i<n;i++){
        cin>>a>>b;
        for(j=0;j<a;j++){
            cin>>x;
            if(x%2==0){
                par++;

            }else{
                imp++;

            }

        }
        if (b%2==0){
            if(b<imp || par>0){
                 cout<<"Yes"<<endl;
            }else{
                cout<<"No";
            }
        }else{
            if (imp%2!=0){
                cout<<"Yes"<<endl;
            }else if(b<imp){
                cout<<"Yes"<<endl;
            }
            else {
                cout<<"No"<<endl;
            }
        }
        par=0;
        imp=0;

    }
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

int main(){
    int n,i,a,b,j,x,par=0,imp=0;
    cin>>n;
    for(i=0;i<n;i++){
        cin>>a>>b;
        for(j=0;j<a;j++){
            cin>>x;
            if(x%2==0){
                par++;

            }else{
                imp++;

            }

        }
        bool band =false;
        if (imp%2==0){
            if(imp-1+par>b){
                band= true;
            }
        }else{
            band= true;
        }

        if(band)cout<<"Yes"<<endl;
        else cout<<"No"<<endl;

        par=0;
        imp=0;

    }
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

int main(){
    int n,i,a,b,j,x,par=0,imp=0;
    cin>>n;
    for(i=0;i<n;i++){
        cin>>a>>b;
        for(j=0;j<a;j++){
            cin>>x;
            if(x%2==0){
                par++;

            }else{
                imp++;

            }

        }
        if (b%2==0){
            if(b<imp and par>0){
                 cout<<"Yes"<<endl;
            }else if(imp%2!=0){
                 cout<<"Yes"<<endl;
            }
            else{
                cout<<"No"<<endl;
            }
        }else{
            if (imp%2!=0 and b>imp){
                cout<<"Yes"<<endl;
            }
            else if (b<=imp){
                cout<<"Yes"<<endl;
            }
            else {
                cout<<"No"<<endl;
            }
        }
        par=0;
        imp=0;

    }
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

int main(){
    int n,i,a,b,j,x,par=0,imp=0;
    cin>>n;
    for(i=0;i<n;i++){
        cin>>a>>b;
        for(j=0;j<a;j++){
            cin>>x;
            if(x%2==0){
                par++;

            }else{
                imp++;

            }

        }
        if (b%2==0){
            if(b<imp and par>0){
                 cout<<"Yes"<<endl;
            }else{
                cout<<"No";
            }
        }else{
            if (imp%2!=0 and b>imp){
                cout<<"Yes"<<endl;
            }
            else if (b<imp){
                cout<<"Yes"<<endl;
            }
            else {
                cout<<"No"<<endl;
            }
        }
        par=0;
        imp=0;

    }
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

int main(){
    int n,i,a,b,j,x,par=0,imp=0;
    cin>>n;
    for(i=0;i<n;i++){
        cin>>a>>b;
        for(j=0;j<a;j++){
            cin>>x;
            if(x%2==0){
                par++;

            }else{
                imp++;

            }

        }
        if (b%2==0){
            if(b<imp and par>0){
                 cout<<"Yes"<<endl;
            }else{
                cout<<"No";
            }
        }else{
            if (imp%2!=0 and b>imp){
                cout<<"Yes"<<endl;
            }
            else if (b<imp){
                cout<<"Yes<<endl;
            }
            else {
                cout<<"No"<<endl;
            }
        }
        par=0;
        imp=0;

    }
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

int main(){
    int n,i,a,b,j,x,par=0,imp=0;
    cin>>n;
    for(i=0;i<n;i++){
        cin>>a>>b;
        for(j=0;j<a;j++){
            cin>>x;
            if(x%2==0){
                par++;

            }else{
                imp++;

            }

        }
        bool band =false;
        if (imp%2==0){
            if(imp-1+par>=b){
                band= true;
            }
        }else{
            band= true;
        }
        if(imp==0) band=false;
        if (par==0 and b%2==0) band=false;
        if(band)cout<<"Yes"<<endl;
        else cout<<"No"<<endl;

        par=0;
        imp=0;

    }
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

int main(){
    int n,i,a,b,j,x,par=0,imp=0;
    cin>>n;
    for(i=0;i<n;i++){
        cin>>a>>b;
        for(j=0;j<a;j++){
            cin>>x;
            if(x%2==0){
                par++;

            }else{
                imp++;

            }

        }
        if (b%2==0){
            if(b<imp || par>0){
                 cout<<"Yes"<<endl;
            }else{
                cout<<"No";
            }
        }else{
            if (imp%2!=0){
                cout<<"Yes"<<endl;
            }if(b<imp){
                cout<<"Yes"<<endl;
            }
            else {
                cout<<"No"<<endl;
            }
        }
        par=0;
        imp=0;

    }
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

int main() {
  int t;
  cin >> t;
  while (t--) {
    int n, x;
    cin >> n >> x;
    vector<int> a;
    while (n--) {
      int v;
      cin >> v;
      a.push_back(v);
    }
    // solution
    int oc = 0, ec = 0;
    for (int i = 0; i < a.size(); i++) {
      if (a[i] % 2 == 0)
        ec++;
      else
        oc++;
    }
    int cs = ec + oc;
    // cout << "oc: " << oc << "ec" << ec << endl;
    if (cs >= x && (oc % 2) == 1)
      cout << "Yes" << '\n';
    else
      cout << "No" << '\n';
  }
}


#include <bits/stdc++.h>

using namespace std;

int main() {
  int t;
  cin >> t;
  while (t--) {
    int n, x;
    cin >> n >> x;
    vector<int> a;
    while (n--) {
      int v;
      cin >> v;
      a.push_back(v);
    }
    // solution
    int oc = 0, ec = 0;
    for (int i = 0; i < a.size(); i++) {
      if (a[i] % 2 == 0)
        ec++;
      else
        oc++;
    }
    cout << "oc " << oc << " ec " << ec << endl;
    int roc = 0, rec = 0;
    // odd count
    if (oc % 2 == 0 && oc > 0)
      roc = oc - 1;
    else
      roc = oc;
    // even count
    rec = x - roc;
    cout << "roc " << roc << " rec " << rec << endl;
    // op
    if (roc <= x && roc % 2 == 1 && rec <= ec)
      cout << "Yes" << '\n';
    else
      cout << "No" << '\n';
  }
}


#include <bits/stdc++.h>

using namespace std;

int main() {
  int t;
  cin >> t;
  while (t--) {
    int n, x;
    cin >> n >> x;
    int n1 = n;
    int odd = 0, even = 0;
    while (n1--) {
      int v;
      cin >> v;
      if (v % 2 == 0)
        even++;
      else
        odd++;
    }
    int oc = 0;
    for (int i = 1; i <= odd; i += 2) {
      if (oc < x)
        oc = i;
    }
    int ec = 0;
    int even_needed = x - oc;
    if (even >= even_needed)
      ec = even_needed;
    else
      ec = -1;

    if (x == (oc + ec) && oc >= 1)
      cout << "Yes" << '\n';
    else
      cout << "No" << '\n';
  }
}


#include <bits/stdc++.h>

using namespace std;

int main() {
  int t;
  cin >> t;
  while (t--) {
    int n, x;
    cin >> n >> x;
    vector<int> a;
    while (n--) {
      int v;
      cin >> v;
      a.push_back(v);
    }
    // solution
    int oc = 0, ec = 0;
    for (int i = 0; i < a.size(); i++) {
      if (a[i] % 2 == 0)
        ec++;
      else
        oc++;
    }
    //cout << "oc " << oc << " ec " << ec << endl;
    int roc = 0, rec = 0;
    // odd count
    if (oc % 2 == 0 && oc > 0)
      roc = oc - 1;
    else
      roc = oc;
    // even count
    rec = x - roc;
    //cout << "roc " << roc << " rec " << rec << endl;
    // op
    if (roc + rec == x && roc % 2 == 1 && rec <= ec)
      cout << "Yes" << '\n';
    else
      cout << "No" << '\n';
  }
}


#include <bits/stdc++.h>

using namespace std;

int main() {
  int t;
  cin >> t;
  while (t--) {
    int n, x;
    cin >> n >> x;
    vector<int> a;
    while (n--) {
      int v;
      cin >> v;
      a.push_back(v);
    }
    // solution
    int oc = 0, ec = 0;
    for (int i = 0; i < a.size(); i++) {
      if (a[i] % 2 == 0)
        ec++;
      else
        oc++;
    }
    //cout << "oc " << oc << " ec " << ec << endl;
    int roc = 0, rec = 0;
    // odd count
    if (oc % 2 == 0 && oc > 0)
      roc = oc - 1;
    else
      roc = oc;
    // even count
    rec = x - roc;
    //cout << "roc " << roc << " rec " << rec << endl;
    // op
    if (roc <= x && roc % 2 == 1 && rec <= ec)
      cout << "Yes" << '\n';
    else
      cout << "No" << '\n';
  }
}


#include <bits/stdc++.h>

using namespace std;

int main() {
  int t;
  cin >> t;
  while (t--) {
    int n, x;
    cin >> n >> x;
    int n1 = n;
    int odd = 0, even = 0;
    while (n1--) {
      int v;
      cin >> v;
      if (v % 2 == 0)
        even++;
      else
        odd++;
    }
    int oc = 0;
    for (int i = 1; i <= odd && i <= x; i += 2) {
      oc = i;
    }
    int ec = 0;
    int even_needed = x - oc;
    //cout << x << '\t' << oc << endl;
    if (even >= even_needed) {
      ec = even_needed;
    }
    else {
      cout << "No" << '\n';
      continue;
    }

    //cout << oc << "\t" << ec << endl;
    if (x == (oc + ec) && oc >= 1)
      cout << "Yes" << '\n';
    else
      cout << "No" << '\n';
  }
}


#include <bits/stdc++.h>

using namespace std;

int main() {
  int t;
  cin >> t;
  while (t--) {
    int n, x;
    cin >> n >> x;
    vector<bool> a;
    int oc = 0, ec = 0;
    while (n--) {
      int v;
      cin >> v;
      a.push_back(v % 2);
      if (v % 2 == 0)
        ec++;
      else
        oc++;
    }
    if (oc == 0) {
      cout << "No" << '\n';
      continue;
    }
    int c = 0;
    int boc = oc, bec = ec;
    for (int i = 0; i < a.size(); i++) {
      if (c < x) {
        if (a[i] == 1 && oc > 0) {
          oc--;
          c++;
        } else if (a[i] == 0 && ec > 0) {
          ec--;
          c++;
        }
      }
    }
    //cout << "x " << x << " c " << c << endl;
    int odd_taken = abs(oc - boc);
    if (x == c && (odd_taken % 2 == 1 || (odd_taken % 2 == 0) && ec > 0 ||
(odd_taken == 0 && oc > 0)))
      cout << "Yes" << '\n';
    else
      cout << "No" << '\n';
  }
}


#include <bits/stdc++.h>

using namespace std;

int main() {
  int t;
  cin >> t;
  while (t--) {
    int n, x;
    cin >> n >> x;
    vector<bool> a;
    int oc = 0, ec = 0;
    while (n--) {
      int v;
      cin >> v;
      a.push_back(v % 2);
      if (v % 2 == 0)
        ec++;
      else
        oc++;
    }
    if (oc == 0) {
      cout << "No" << '\n';
      continue;
    }
    int c = 0;
    int boc = oc, bec = ec;
    for (int i = 0; i < a.size(); i++) {
      if (c < x) {
        if (a[i] == 1 && oc > 0) {
          oc--;
          c++;
        } else if (a[i] == 0 && ec > 0) {
          ec--;
          c++;
        }
      }
    }
    //cout << "x " << x << " c " << c << endl;
    int odd_taken = abs(oc - boc);
    if (x == c && (odd_taken % 2 == 1 || (odd_taken % 2 == 0) && ec > 0))
      cout << "Yes" << '\n';
    else
      cout << "No" << '\n';
  }
}


#include <iostream>
#include <cstdio>
#include <cmath>
#include <algorithm>

using namespace std;

long long a;

long long expo(long long base, long long exp)
{
    long long ret = 1;
    while(exp)
    {
        if(exp & 1)
            ret *= base;

        base *= base;
        exp >>= 1;
    }
    return ret;
}

inline long long toll(string &s)
{
    long long ret = 0;
    for(int i = 0;i < s.size();++i)
        ret = ret * 10 + s[i] - '0';

    return ret;
}

inline long long co(long long x)
{
    string s;
    while(x)
    {
        s += '0' + (x % 10);
        x /= 10;
    }
    reverse(s.begin(), s.end());

    long long ret = 0;
    for(int i = 0;i < s.size();++i)
    {
        string r = s.substr(i + 1, (int)s.size() - i - 1);
        string l = s.substr(0, i);

        long long rr = toll(r);
        long long ll = toll(l);

        ret += (rr + 1) * (s[i] - '0');
        ret += ll * (s[i] - '0') * expo(10, r.size());

        for(int j = s[i] - '0' - 1;j > 0;--j)
            ret += j * expo(10, r.size()) * (ll + 1);

        for(int j = s[i] - '0' + 1;j < 10;++j)
            ret += j * expo(10, r.size()) * ll;

    }

    return ret;
}

string to_s(long long x)
{
    string s;
    while(x)
    {
        s += '0' + (x % 10);
        x /= 10;
    }
    reverse(s.begin(), s.end());

    return s;
}

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

    long long st = 1;
    while(true)
    {
        long long lo = 1, hi = 10000000000000000LL;
        while(lo + 1 < hi)
        {
            long long mid = lo + ((hi - lo) >> 1);
            if(co(mid) - co(st - 1) <= a)
                lo = mid;
            else
                hi = mid;
        }
        while(co(lo + 1) <= a)
            ++lo;

        if(co(lo) - co(st - 1) == a)
        {
            printf("%I64d %I64d\n", st, lo);
            return 0;
        }
        ++st;
    }

    return 0;
}


#include <iostream>
#include <cstdio>
#include <cmath>
#include <algorithm>

using namespace std;

long long a;

long long expo(long long base, long long exp)
{
    long long ret = 1;
    while(exp)
    {
        if(exp & 1)
            ret *= base;

        base *= base;
        exp >>= 1;
    }
    return ret;
}

inline long long toll(string &s)
{
    long long ret = 0;
    for(int i = 0;i < s.size();++i)
        ret = ret * 10 + s[i] - '0';

    return ret;
}

inline long long co(long long x)
{
    string s;
    while(x)
    {
        s += '0' + (x % 10);
        x /= 10;
    }
    reverse(s.begin(), s.end());

    long long ret = 0;
    for(int i = 0;i < s.size();++i)
    {
        string r = s.substr(i + 1, (int)s.size() - i - 1);
        string l = s.substr(0, i);

        long long rr = toll(r);
        long long ll = toll(l);

        ret += (rr + 1) * (s[i] - '0');
        ret += ll * (s[i] - '0') * expo(10, r.size());

        for(int j = s[i] - '0' - 1;j > 0;--j)
            ret += j * expo(10, r.size()) * (ll + 1);

        for(int j = s[i] - '0' + 1;j < 10;++j)
            ret += j * expo(10, r.size()) * ll;

    }

    return ret;
}

string to_s(long long x)
{
    string s;
    while(x)
    {
        s += '0' + (x % 10);
        x /= 10;
    }
    reverse(s.begin(), s.end());

    return s;
}

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

    long long st = 1;
    while(true)
    {
        long long lo = 1, hi = 100000000000000000LL;
        while(lo + 1 < hi)
        {
            long long mid = lo + ((hi - lo) >> 1);
            if(co(mid) - co(st - 1) <= a)
                lo = mid;
            else
                hi = mid;
        }
        while(co(lo + 1) <= a)
            ++lo;

        if(co(lo) - co(st - 1) == a)
        {
            printf("%I64d %I64d\n", st, lo);
            return 0;
        }
        ++st;
    }

    return 0;
}


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

#define int long long

const int what = 1e18;

int mod;

main(void) {
    scanf("%lld" , &mod);
    if(mod == 1e18) {
	puts("1 100000000000000000000000000");
	return 0;
    }
    int fff = (what / 10 % mod) % mod * 3 % mod;
    fff = fff * 3 % mod;
    fff = fff * 2 % mod;
    fff = fff * 3 % mod;
    fff = fff * 3 % mod;
    fff = (fff * 3 % mod + fff * 2 % mod) % mod;
    cout << mod - fff <<" " << what + mod - fff - 1 << endl;
}


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

#define int long long

const int what = 1e18;

int mod;

main(void) {
    scanf("%lld" , &mod);
    if(mod == 1e18) {
	puts("1 9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999");
	return 0;
    }
    int fff = (what / 10 % mod) % mod * 3 % mod;
    fff = fff * 3 % mod;
    fff = fff * 2 % mod;
    fff = fff * 3 % mod;
    fff = fff * 3 % mod;
    fff = (fff * 3 % mod + fff * 2 % mod) % mod;
    cout << mod - fff <<" " << what + mod - fff - 1 << endl;
}


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

#define int long long

const int what = 1e18;

int mod;

main(void) {
    scanf("%lld" , &mod);
    int fff = (what % mod) % mod * 3 % mod;
    fff = fff * 3 % mod;
    fff = fff * 2 % mod;
    fff = fff * 3 % mod;
    fff = fff * 3 % mod;
    fff = (fff * 3 % mod + fff * 2 % mod) % mod;
    cout << mod - fff <<" " << what + mod - fff - 1 << endl;
}


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

#define int long long

const int MAX = 1e18;
const int N = 2e3 + 5;

int  n , m , x , y , mod;

int len , a[N];

bool vis[205];

unsigned int dp[205] , S[205];

#define u unsigned int

#define Pair pair<u,u>

Pair dfs(int pos , int limit){
    if(!pos) return make_pair(0 , 1);
    if(!limit && vis[pos]) {
	return make_pair(dp[pos] , S[pos]);
    }
    if(!limit) vis[pos] = 1;
    int up = (limit) ? a[pos] : 9;
    u res = 0 , Size = 0;
    for(int i = 0;i <= up;++ i) {
	Pair xxx = dfs(pos - 1 , (i == a[pos] && limit));
	res += xxx.first + xxx.second * i; Size += xxx.second;
    }
    if(!limit)dp[pos] = res , S[pos] = Size;
    return make_pair(res , Size);
}

unsigned int sum(int x) {
    if(!x) return 0;
    len = 0;
    while(x) {
	a[++ len] = x % 10;
	x /= 10;
    }
    return dfs(len , 1).first;
}

signed main(void) {
    srand((unsigned long long) new char);
    cin >> mod;
    while(1) {
	int x = rand() + 1;
	unsigned int first = sum(x - 1);
	int l = 0 , r = 2e16 , res = 0;
	while(l <= r) {
	    int mid = (l + r) >> 1;
	    unsigned int second = sum(mid);
	    if(second >= first + mod) {
		res = mid; r = mid - 1;
	    }
	    else l = mid + 1;
	}
	if((int)(sum(res) - first)% mod == 0){
	    cout << x <<" " << res << endl;
	    return 0;
	}
    }
}


#include<cstdio>
#include<iostream>
#include<cstring>
#include<algorithm>
#include<cmath>
#include<vector>
#include<queue>
#include<map>
#include<set>
#include<ctime>
using namespace std;
typedef long long ll;
#define INF 0x3f3f3f3f
#define maxn 1111
ll a,m=1e18;
int main()
{
	while(~scanf("%I64d",&a))
	{
		ll ans=a-m%a*9%a*9%a;
		printf("%I64d %I64d\n",ans,ans+m-1);
	}
	return 0;
}


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

#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
#define ordered_set tree<ll, null_type,less<ll>, rb_tree_tag,tree_order_statistics_node_update>

#ifdef sarthak
#define trace(...) __f(#__VA_ARGS__, __VA_ARGS__)
template <typename Arg1>
void __f(const char* name, Arg1&& arg1){
    cout << name << " : " << arg1 << endl;
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args){
    const char* comma = strchr(names + 1, ',');cout.write(names, comma - names) << " : " << arg1<<" | ";__f(comma+1, args...);
}
int begtime = clock();
#else
#define trace(...)
#endif

#ifndef sarthak
    #pragma GCC optimize("Ofast")
    #pragma GCC optimize("unroll-loops")
    // #pragma GCC target ("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#endif

#define ll long long

#define foreach(it,ar) for (typeof(ar.begin()) it = ar.begin(); it != ar.end(); it++)
#define fort(i,v) for(auto i:v)
#define fr(i,a,b) for (ll i = (a), _b = (b); i <= _b; i++)
#define frr(i,a,b) for (ll i = (a), _b = (b); i >= _b; i--)
#define rep(i,n) for (ll i = 0, _n = (n); i < _n; i++)
#define repr(i,n) for (ll i = n - 1; i >= 0; i--)
#define fill(ar,val) rep(i,sizeof(ar)/sizeof(ll)) ar[i]=val
#define fill2(ar,val) rep(i,sizeof(ar)/sizeof(ar[0])) rep(j,sizeof(ar[0])/sizeof(ll)) ar[i][j]=val
#define fill0(ar) memset(ar,0,sizeof(ar))
#define debug(x) cout<<#x<<": "<<x<<endl

#define ld long double
#define pb push_back
#define mp make_pair
#define ff first
#define ss second
#define sd(x) scanf("%d",&x)
#define slld(x) scanf("%lld",&x)
#define sd2(x,y) scanf("%d %d",&x,&y)
#define slld2(x,y) scanf("%lld %lld",&x,&y)
#define pd(x) printf("%d\n",x)
#define plld(x) printf("%lld\n",x)
#define pd2(x,y) printf("%d %d\n",x,y)
#define plld2(x,y) printf("%lld %lld\n",x,y)
#define all(ar) ar.begin(), ar.end()
#define endl '\n'
#define sz(x) (int)x.size()
#define len(x) (int)x.length()

typedef pair<ll, ll> ii;
typedef pair<ii, ll> iii;
typedef vector<ii> vii;
typedef vector<ll> vi;

#define INF 1000000000000000000
#define PI 3.14159265358979323846L

mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
mt19937_64 rngb(chrono::steady_clock::now().time_since_epoch().count()); // can give negative values too

bool check(ll x, ll a)
{
    ll x2 = x;
    ll kit = 1;
    ll ans = 0;
    ll num = 0;

    while(x!=0)
    {
        ll dig = x%10;
        x = x/10;

        rep(i,dig)
        {
            ans = ans + ((x+1)*i)*kit;
        }
        ans = ans + (x*dig*kit) + (dig*(num+1));
        for(ll i=dig+1; i<=9; i++)
        {
            ans = ans + (x*i*kit);
        }

        num = dig*kit + num;
        kit = kit*10;
    }

    if(ans>=a)
        return 1;
    return 0;
}

ll findxx(ll x)
{
    ll x2 = x;
    ll kit = 1;
    ll ans = 0;
    ll num = 0;

    while(x!=0)
    {
        ll dig = x%10;
        x = x/10;

        rep(i,dig)
        {
            ans = ans + ((x+1)*i)*kit;
        }
        ans = ans + (x*dig*kit) + (dig*(num+1));
        for(ll i=dig+1; i<=9; i++)
        {
            ans = ans + (x*i*kit);
        }

        num = dig*kit + num;
        kit = kit*10;
    }
    return ans;
}

ll digsum(ll x)
{
    ll ans = 0;
    while(x!=0)
    {
        ll dig = x%10;
        ans = ans + dig;
        x = x/10;
    }
    return ans;
}

void solve()
{
    ll a;
    cin >> a;

    ll l = 1;
    ll lo = 1;
    ll hi = 1e17;

    while(lo<hi)
    {
        ll mid = (lo+hi)/2;
        if(check(mid,a))
            hi = mid;
        else
            lo = mid+1;
    }

    ll r = lo;

    ll xx = findxx(r);
    while(xx!=a)
    {
        while(xx>a)
        {
            xx = xx - digsum(l);
            l++;
        }
        while(xx<a)
        {
            r++;
            xx = xx + digsum(r);
        }
    }

    cout << l << " " << r << endl;
}

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout << fixed;
    cout << setprecision(10);
    #ifdef sarthak
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
    #endif

    ll t = 1;
    // cin >> t;
    while(t--)
    {
        solve();
    }

    #ifdef sarthak
    cerr << "Time elapsed: " << (clock() - begtime)*1000/CLOCKS_PER_SEC << " ms\n\n";
    #endif
}


// =========== Template ========== //
#include <bits/stdc++.h>
using namespace std;
int fastio() { ios_base::sync_with_stdio(false); cout << fixed << setprecision(10); cin.tie(nullptr); return 0; }
int __fastio = fastio();
template<typename A, typename B> ostream& operator<<(ostream &os, const pair<A, B> &p);
template<typename T>ostream& operator<<(ostream& os, const vector<T>& v) { os << "{"; string sep = ""; for (auto e: v) os << sep << e, sep = ", "; return os << "}"; }
template<typename A, typename B> ostream& operator<<(ostream &os, const pair<A, B> &p) { os << '(' << p.first << ", " << p.second << ')'; return os; }
void dbg_out() { cerr << endl; }
template<typename Head, typename... Tail> void dbg_out(Head H, Tail... T) { cerr << ' ' << H; dbg_out(T...); }
#ifdef STEVEN
#define pp(...) cerr << "(" << #__VA_ARGS__ << "):", dbg_out(__VA_ARGS__)
#else
#define pp(...)
#endif
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef long double ld;
#define fi first
#define se second
#define sz(x) (int((x).size()))
#define data _data
// =========== Book ============ //

// =========== Solution ============= //

int f(ll x) {
  ll ans = 0;
  while (x) {
    ans += x % 10;
    x /= 10;
  }
  return ans;
}

// Sum f(1) + ... f(x)
ll g(ll x) {
  ll ans = 0;
  ll pow = 1;
  while (x) {
    int d = x % 10;
    x /= 10;
    ll val = (f(x) * (d + 1) + d * (d + 1) / 2);
    ll oth = x * 45;
    ans += pow * (val + oth);
    pow *= 10;
    if (x) {
      --x;
    }
  }
  return ans;
}

int main() {
  pp(g(2333331942000LL));
  ll a;
  cin >> a;
  ll x = 1;
  while (g(x) < a) x *= 2;
  ll half = x;
  while (half > 0) {
    if (g(x - half) >= a) x -= half;
    half /= 2;
  }
  int y = 1;
  ll val = g(x) - a;
  while (val) {
    if (f(y) <= val) {
      val -= f(y);
      ++y;
    } else {
      ++x;
      val += f(x);
    }
  }

  cout << y << " " << x << "\n";
}

// ============== Notes =============== //
// common bugs
// - fastio
// - int overflow (especially intermediate expressionns)
// - array bounds (indices bigger than MAXN? different MAXN vs MAXM?)
// - special cases (n=1? graph not connected?)
// - initialize & re-initialize efficiently between test cases
//
// history of bugs
// - 3/28/20 forgot to initialize set with dummy node (n) [cf 1136e]
// - 3/28/20 array bounds (map was size MAXN instead of MAXK) [cf 1210b]
// - 3/29/20 array bounds ([MAXN][MAXN][4] -> [MAXN][MAXN * 2][4]) [cf 1051d]
// - 3/29/20 special cases (answer cannot be empty string) [cf 848a]
// - 3/29/20 special case / bad initialization of (ans, ansi) when backtracking [cf 733f]
// - 3/30/20 special case / "0" has length 0 in binary [cf 748b]
// - 4/2/20 fakesolve -- setup of dp states missed possible transitions / solutions [cf 771D]
// - 4/2/20 fakesolve -- cant count inversions in linear time, misunderstand structure of problem [cf 771D]
// - 4/3/20 (TLE) re-initialization was too slow [cf 1329 D]
// - 4/3/20 (WA) bottom-up segtree query didn't handle [0, n) correctly
// - 4/5/20 array bounds -- two different array sizes needed [cf 18d]
// - 4/5/20 fakesolve -- greedy sol was wrong,  needed dp [cf 18d]
// - 4/6/20 fakesolve -- tried to do LIS backtracking incorrectly w/ greedy approach, needed true backtracking [cf 650d]
// - 4/6/20 array bounds -- indexing with count into vector of size n; needs to be n + 1


#include <bits/stdc++.h>

using namespace std;

int main () {
    long long int g = 1, a;
    cin >> a;
    for(int i = 0 ; i < 18 ; i++ ) {
        g *= 10;
    }
    long long int pw = g;
    g /= 10;
    g %= a;
    g *= 45;
    g %= 18;
    g %= a;
    g++;
    g %= a;
    cout << max(1ll, a - g + 1) <<  ' ' << pw + a - g;
}


#include <bits/stdc++.h>

using namespace std;

int main () {
    unsigned long long int g = 1, a;
    cin >> a;
    for(int i = 0 ; i < 18 ; i++ ) {
        g *= 10;
    }
    long long int pw = g;
    g /= 10;
    g %= a;
    g *= 45;
    g %= a;
    g *= 18;
    g %= a;
    g++;
    g %= a;
    cout << max(1ll, a - g + 1) <<  ' ' << pw + a - g;
}


#include <bits/stdc++.h>

using namespace std;

int main () {
    long long int g = 1, a;
    cin >> a;
    for(int i = 0 ; i < 18 ; i++ ) {
        g *= 10;
    }
    long long int pw = g;
    g /= 10;
    g %= a;
    g *= 45;
    g %= 18;
    g %= a;
    cout << max(1ll, a - g - 1) <<  ' ' << pw + a - g - 1;
}


#include <bits/stdc++.h>

using namespace std;

int main () {
    long long int g = 1, a;
    cin >> a;
    for(int i = 0 ; i < 18 ; i++ ) {
        g *= 10;
    }
    long long int pw = g;
    g /= 10;
    g %= a;
    g *= 45;
    g %= 18;
    g %= a;
    cout << a - g <<  ' ' << pw + a - g;
}


#include <bits/stdc++.h>

using namespace std;

int main () {
    unsigned long long int g = 1, a;
    cin >> a;
    for(int i = 0 ; i < 18 ; i++ ) {
        g *= 10;
    }
    long long int pw = g;
    g /= 10;
    g %= a;
    g *= 45;
    g %= a;
    g *= 18;
    g %= a;
    g++;
    g %= a;
    cout << (a - g + 1) <<  ' ' << pw + a - g;
}


#include <bits/stdc++.h>

using namespace std;

int main () {
    long long int g = 1, a;
    cin >> a;
    for(int i = 0 ; i < 18 ; i++ ) {
        g *= 10;
    }
    long long int pw = g;
    g %= a;
    g *= 45;
    g %= 18;
    g %= a;
    cout << a - g <<  ' ' << pw + a - g;
}


#include <bits/stdc++.h>

using namespace std;

int main () {
    long long int g = 1, a;
    cin >> a;
    for(int i = 0 ; i < 18 ; i++ ) {
        g *= 10;
    }
    long long int pw = g;
    g /= 10;
    g %= a;
    g *= 45;
    g %= a;
    g*=18;
    g %= a;
    g++;
    g %= a;
    cout << max(1ll, a - g + 1) <<  ' ' << pw + a - g;
}


#include <bits/stdc++.h>

using namespace std;

int main () {
    long long int g = 1, a;
    cin >> a;
    for(int i = 0 ; i < 18 ; i++ ) {
        g *= 10;
    }
    long long int pw = g;
    g *= 45 * 18;
    g %= a;
    cout << a - g <<  ' ' << pw + a - g;
}


#include <bits/stdc++.h>

using namespace std;

#define PB push_back
#define MP make_pair
#define X first
#define Y second

#define cil(a,b) ( ((a)%(b) == 0)?((a)/(b)):((a)/(b)+1) )
#define err(x) cerr << #x << " = " << x << endl;
#define read(a) freopen(a,"r",stdin)
#define write(a) freopen(a,"w",stdout)
#define forall(i,a,b) for(int i=a;i<b;i++)
#define foreach(v, c) for(typeof((c).begin())v=(c).begin();v!=(c).end();++v)

typedef long long ll;
typedef double db;
typedef vector<int> vi;
typedef vector<long long> vll;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef pair<double,double> pdd;
typedef vector<pii> vii;

clock_t start;
void Time(bool timeIt) {
	if (!timeIt) return;
	clock_t end = clock();
	double elapsed_time = ((db)end - (db)start) / (db)CLOCKS_PER_SEC;
	printf("Time elapsed = %0.4lf\n", elapsed_time);
}

#define LINF (long long)1e18
#define EPS 1e-9
#define INF 1000000007ll
#define SIZE 100010
#define MAX_A 1000010

ll multiply(ll a, ll b, ll mod) {
	ll ret = 0, pw = a;
	for (int i = 0 ; (1ll << i) <= b ; ++i) {
		if (b & (1ll << i)) ret = (ret + pw) % mod;
		pw = (pw + pw) % mod;
	}
	return ret;
}

ll calc(ll b, ll mod) {
	if (b < 10) return (b * (b + 1) / 2) % mod;
	ll ret = 0, rem = b % 10;
	ret = (b / 10 - 1) * 45ll + (rem * (rem + 1) / 2);
	return (ret + multiply(calc(b / 10 - 1, mod), 10ll, mod) + ((rem + 1) * ((b / 10) % 10))) % mod;
}

bool check(ll l, ll r, ll a) {
	ll res = 0;
	for (ll i = l ; i <= r ; ++i) {
		ll j = i;
		while (j > 0) {
			res += j % 10;
			if (res >= a) res -= a;
			j /= 10;
		}
	}
	return (res == 0);
}

int main() {
	start = clock();
	ll a;
	cin >> a;

	ll pw = 10, b;
	for (int i = 1 ; i <= 18 ; ++i) {
		if (a < pw) {
			b = pw;
			break;
		}
		pw *= 10ll;
	}

	ll off = calc(b, a), l = a - off + 1, r = pw + a - off;

	//if (check(l, r, a)) cout << "Passed" << endl;
	//else cout << "Failed" << endl;

	cout << l << " " << r << endl;

	Time(false);
	return 0;
}


#include <bits/stdc++.h>

using namespace std;

#define PB push_back
#define MP make_pair
#define X first
#define Y second

#define cil(a,b) ( ((a)%(b) == 0)?((a)/(b)):((a)/(b)+1) )
#define err(x) cerr << #x << " = " << x << endl;
#define read(a) freopen(a,"r",stdin)
#define write(a) freopen(a,"w",stdout)
#define forall(i,a,b) for(int i=a;i<b;i++)
#define foreach(v, c) for(typeof((c).begin())v=(c).begin();v!=(c).end();++v)

typedef long long ll;
typedef double db;
typedef vector<int> vi;
typedef vector<long long> vll;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef pair<double,double> pdd;
typedef vector<pii> vii;

clock_t start;
void Time(bool timeIt) {
	if (!timeIt) return;
	clock_t end = clock();
	double elapsed_time = ((db)end - (db)start) / (db)CLOCKS_PER_SEC;
	printf("Time elapsed = %0.4lf\n", elapsed_time);
}

#define LINF (long long)1e18
#define EPS 1e-9
#define INF 1000000007ll
#define SIZE 100010
#define MAX_A 1000010

ll multiply(ll a, ll b, ll mod) {
	ll ret = 0, pw = a;
	for (int i = 0 ; (1ll << i) <= b ; ++i) {
		if (b & (1ll << i)) ret = (ret + pw) % mod;
		pw = (pw + pw) % mod;
	}
	return ret;
}

ll lg = 1, p[19];
/*
ll calc(ll b, ll mod) {
	ll ret = 0;
	for (int i = lg - 1 ; i >= 0 ; --i) {
		ll rem = b % p[i], d = (b / p[i]) % 10, pref = b / p[i + 1];
		ret = (ret + multiply(pref, multiply(p[i], 45ll, mod), mod) + multiply(rem, d, mod)) % mod;
		ret += multiply(p[i], d * (d - 1) / 2, mod);
		if (ret >= mod) ret -= mod;
	}
	return ret;
}
*/

ll calc(ll b, ll mod) {
	ll ret = multiply(p[lg - 1], lg * 45ll, mod);
	return ret;
}

bool check(ll l, ll r, ll a) {
	ll res = 0;
	for (ll i = l ; i <= r ; ++i) {
		ll j = i;
		while (j > 0) {
			res += j % 10;
			if (res >= a) res -= a;
			j /= 10;
		}
	}
	return (res == 0);
}

int main() {
	start = clock();
	ll a;
	cin >> a;

	ll b;
	p[0] = 1;
	for (int i = 1 ; i < 19 ; ++i) p[i] = (p[i - 1] * 10ll);
	for (int i = 1 ; i <= 18 ; ++i) {
		if (a <= p[i]) {
			b = p[i];
			lg = i;
			break;
		}
	}

	ll off = calc(b, a), l = a - off, r = b + a - off - 1;

	cout << l << " " << r << endl;

	Time(false);
	return 0;
}


#include <bits/stdc++.h>

using namespace std;

#define PB push_back
#define MP make_pair
#define X first
#define Y second

#define cil(a,b) ( ((a)%(b) == 0)?((a)/(b)):((a)/(b)+1) )
#define err(x) cerr << #x << " = " << x << endl;
#define read(a) freopen(a,"r",stdin)
#define write(a) freopen(a,"w",stdout)
#define forall(i,a,b) for(int i=a;i<b;i++)
#define foreach(v, c) for(typeof((c).begin())v=(c).begin();v!=(c).end();++v)

typedef long long ll;
typedef double db;
typedef vector<int> vi;
typedef vector<long long> vll;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef pair<double,double> pdd;
typedef vector<pii> vii;

clock_t start;
void Time(bool timeIt) {
	if (!timeIt) return;
	clock_t end = clock();
	double elapsed_time = ((db)end - (db)start) / (db)CLOCKS_PER_SEC;
	printf("Time elapsed = %0.4lf\n", elapsed_time);
}

#define LINF (long long)1e18
#define EPS 1e-9
#define INF 1000000007ll
#define SIZE 100010
#define MAX_A 1000010

ll multiply(ll a, ll b, ll mod) {
	ll ret = 0, pw = a;
	for (int i = 0 ; (1ll << i) <= b ; ++i) {
		if (b & (1ll << i)) ret = (ret + pw) % mod;
		pw = (pw + pw) % mod;
	}
	return ret;
}

ll lg = 1, p[19];
/*
ll calc(ll b, ll mod) {
	ll ret = 0;
	for (int i = lg - 1 ; i >= 0 ; --i) {
		ll rem = b % p[i], d = (b / p[i]) % 10, pref = b / p[i + 1];
		ret = (ret + multiply(pref, multiply(p[i], 45ll, mod), mod) + multiply(rem, d, mod)) % mod;
		ret += multiply(p[i], d * (d - 1) / 2, mod);
		if (ret >= mod) ret -= mod;
	}
	return ret;
}
*/

ll calc(ll b, ll mod) {
	ll ret = multiply(p[lg - 1], lg * 45ll, mod);
	return ret;
}

bool check(ll l, ll r, ll a) {
	ll res = 0;
	for (ll i = l ; i <= r ; ++i) {
		ll j = i;
		while (j > 0) {
			res += j % 10;
			if (res >= a) res -= a;
			j /= 10;
		}
	}
	return (res == 0);
}

int main() {
	start = clock();
	ll a;
	cin >> a;

	ll b;
	p[0] = 1;
	for (int i = 1 ; i < 19 ; ++i) p[i] = (p[i - 1] * 10ll);
	for (int i = 1 ; i <= 18 ; ++i) {
		if (a < p[i]) {
			b = p[i];
			lg = i;
			break;
		}
	}

	ll off = calc(b, a), l = a - off, r = b + a - off - 1;

	//if (check(l, r, a)) cout << "Passed" << endl;
	//else cout << "Failed" << endl;

	cout << l << " " << r << endl;

	Time(false);
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
long long mov,a,s;
int main(){
    cin>>a;
    mov=a-9ll*(9000000000000000000ll%a)%a;
    cout<<mov<<' '<<1000000000000000000ll+mov-1<<endl;
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
long long mov,a,s;
int main(){
    cin>>a;
    mov=a-9*(1e18*9%a)%a;
    cout<<mov<<' '<<1e18+mov-1<<endl;
    return 0;
}


#include <bits/stdc++.h>

using namespace std;
typedef long long ll;

ll a, l, r, x, d, p10 = 10;
string prefix;

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

    if (a < 45) {
        for(int i = 0; i < 2; i++) {
            for(int j = 0; j < a; j++)
                printf("1");
            printf(" ");
        }
        return 0;
    }

    l = 0, r = 9, x = 45, d = 1;
    while(1) {
        ll nx = 45LL * p10 * (d + 1);
        if(nx > a) break;

        x = nx;
        p10 *= 10LL;
        d++;
        r = 10LL * r + 9;
    }

    a -= x;
    ll pref = a / p10;

    while(pref) {
        ll tmp = min(pref, 9LL);
        prefix += char('0' + tmp);
        pref -= tmp;
    }
    assert(prefix.size() < 1980);

    l += a % p10;
    r += a % p10;

    ll len1 = 0, len2 = 0;
    if(l == 0) len1 = 1;
    for(ll tmp = l; tmp; tmp /= 10, len1++);
    for(ll tmp = r; tmp; tmp /= 10, len2++);
    string lpref(len2 - len1, '0');

    if(prefix.empty()) lpref = "";
    if(prefix.empty() && l == 0) l = 1;
    printf("%s%s%lld %s%lld\n", prefix.c_str(), lpref.c_str(), l, prefix.c_str(), r);
    return 0;
}


#include <bits/stdc++.h>

#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>

#define sf scanf
#define pf printf
#define pb push_back
#define mp make_pair
#define PI ( acos(-1.0) )
#define mod 100000007LL
#define IN freopen("C.in","r",stdin)
#define OUT freopen("output.txt","w",stdout)
#define FOR(i,a,b) for(i=a ; i<=b ; i++)
#define DBG pf("Hi\n")
#define INF 1000000000
#define i64 long long int
#define eps (1e-8)
#define xx first
#define yy second
#define ln 17
#define off 2
#define sq(x)  ((x)*(x))

using namespace __gnu_pbds;
using namespace std ;

typedef tree< i64, null_type, less<i64>, rb_tree_tag, tree_order_statistics_node_update> ordered_set;
typedef pair<i64, i64> pii;

i64 f( i64 n )
{
    i64 m = n ;
    string s ;
    while(m!=0)
    {
        char ch = m%10 + '0' ;
        s += ch ;
        m /= 10 ;
    }

    reverse( s.begin()  , s.end() ) ;

  //  cout<<s<<endl ;

    i64 sum[35] , cnt[35] ;

    cnt[0] = 1 ;
    for(int i=1 ; i<=18 ; i++) cnt[i] = cnt[i-1]*10LL ;

    sum[0] = 0 ;

    i64 ans = 0LL ;

    for(int i=1 ; i<(int)s.size() ; i++)
    {
        sum[i] = 0 ;
        for(int j=1 ; j<=9 ; j++)
        {
            sum[i] = sum[i] +  j*cnt[i-1] + sum[i-1] ;
        }
        sum[i] += sum[i-1] ;
      //  printf("%lld\n",sum[i]) ;
    }

    ans = sum[ (int)s.size() - 1 ] ;

 //   cout<<ans<<endl ;

    int sz = (int)s.size() ;
    i64 num = 0LL ;

    for(int i=0 ; i<sz ; i++)
    {
        int j = 0 ;
        if(i==0) j = 1 ;

        for( ; j < s[i]-'0' ; j++ )
        {
            ans += ( j*cnt[ sz-i-1 ] + sum[sz-i-1] ) ;
            ans +=  num*cnt[sz-i-1] ;
        }
        num  = num + (s[i]-'0') ;
    }
    return ans+num ;
}

i64 dSum( i64 n )
{
    i64 s = 0 ;
    while( n!=0 )
    {
        s += n%10 ;
        n /= 10 ;
    }
    return s ;
}

int main()
{
   // i64 ans1 =  0LL ;

   // for(int i=1 ; i<=523 ; i++) ans1 += dSum(i) ;

   // cout<<ans1<<endl ;

   // i64 res = f(523) ;

  //  printf("%lld\n",res) ;

    i64 m ;
    scanf("%lld",&m) ;

//    cout<<f(10)<<endl ;

    i64 lo = 0 , hi = 1e17 ;

    while( lo < hi )
    {
        i64 mid = (lo+hi+1)/2 ;

        i64 res = f(mid) ;
        if( res <= m ) lo= mid ;
        else hi = mid-1 ;
    }

  //  printf("%lld\n",lo) ;

    i64 l = 1 , r = lo ;

    i64 sum = f(r) ;

    while( 1  )
    {
        while( sum < m )
        {
            r++ ;
            sum += dSum(r) ;
        }
        while( sum > m )
        {
            sum -= dSum(l) ;
            l++ ;
        }
        if( sum%m==0 )
        {
            printf("%lld %lld\n",l,r) ;
            return 0 ;
        }
    }

    return 0 ;
}


#include<bits/stdc++.h>
using namespace std;
typedef double db;
typedef long long ll;
typedef vector<int> vi;
typedef pair<int, int> pii;
#define fi first
#define se second
#define mp make_pair
#define pb push_back
#define sz(x) ((int)(x).size())
#define all(x) (x).begin(),(x).end()
#define rep(i,l,r) for(int i=(l);i<(r);++i)
#define per(i,l,r) for(int i=(r)-1;i>=(l);--i)
#define dd(x) cout << #x << " = " << x << ", "
#define de(x) cout << #x << " = " << x << endl

ll calx(ll x) {
    ll ret = 0;
    for (; x; x /= 10) ret += x % 10;
    return ret;
}

ll p10[20];
ll calpre(ll x) {
    int bit = !x; for (ll t = x; t; t /= 10) bit++;
    ll ret = 0;
    per(i, 0, bit) {
        ll mask = p10[i];
        if (x / mask == 0) continue;
        ret += (x / mask - 1) * (x / mask) / 2 * mask; //de(ret);
        ret += (x / mask) * 45 * i * (mask / 10); //de(ret);
        ret += (x / mask) * (x % mask + 1); //de(ret);
        x %= mask;
    }
    return ret;
}

int main() {
    //freopen("xx.in", "r", stdin);
    p10[0] = 1; rep(i, 1, 20) p10[i] = p10[i - 1] * 10;
    ll des; scanf("%lld", &des);
    ll rpos;
    for (ll l = 1, r = 2e16 + 7, mid = l + r >> 1; l <= r; mid = l + r >> 1) {
        if (calpre(mid) < des) l = mid + 1; else r = (rpos = mid) - 1;
    }
    ll lpos = 1, sum = calpre(rpos);
    while (sum != des) {
        sum += calx(++rpos);
        while (sum > des) sum -= calx(lpos++);
    }
    cout << lpos << " " << rpos << endl;

    return 0;
}