A few years ago, Hitagi encountered a giant crab, who stole the whole of her body weight. Ever since, she tried to avoid contact with others, for fear that this secret might be noticed.To get rid of the oddity and recover her weight, a special integer sequence is needed. Hitagi's sequence has been broken for a long time, but now Kaiki provides an opportunity.Hitagi's sequence a has a length of n. Lost elements in it are denoted by zeros. Kaiki provides another sequence b, whose length k equals the number of lost elements in a (i.e. the number of zeros). Hitagi is to replace each zero in a with an element from b so that each element in b should be used exactly once. Hitagi knows, however, that, apart from 0, no integer occurs in a and b more than once in total.If the resulting sequence is not an increasing sequence, then it has the power to recover Hitagi from the oddity. You are to determine whether this is possible, or Kaiki's sequence is just another fake. In other words, you should detect whether it is possible to replace each zero in a with an integer from b so that each integer from b is used exactly once, and the resulting sequence is not increasing.

The first line of input contains two space-separated positive integers n (2 ≤ n ≤ 100) and k (1 ≤ k ≤ n) — the lengths of sequence a and b respectively. The second line contains n space-separated integers a1, a2, ..., an (0 ≤ ai ≤ 200) — Hitagi's broken sequence with exactly k zero elements. The third line contains k space-separated integers b1, b2, ..., bk (1 ≤ bi ≤ 200) — the elements to fill into Hitagi's sequence. Input guarantees that apart from 0, no integer occurs in a and b more than once in total.

Output "Yes" if it's possible to replace zeros in a with elements in b and make the resulting sequence not increasing, and "No" otherwise.

NoteIn the first sample:   Sequence a is 11, 0, 0, 14.  Two of the elements are lost, and the candidates in b are 5 and 4.  There are two possible resulting sequences: 11, 5, 4, 14 and 11, 4, 5, 14, both of which fulfill the requirements. Thus the answer is "Yes". In the second sample, the only possible resulting sequence is 2, 3, 5, 8, 9, 10, which is an increasing sequence and therefore invalid.

#include<stdio.h>
int main(void)
{
    int a,b,t;
    scanf("%d %d",&a,&b);
    int ara[a],bra[b];
    int i=0,j=0;
    for(i=0;i<a;i++)
    scanf("%d",&ara[i]);
    for(j=0;j<b;j++)
    scanf("%d",&bra[j]);
    for(i=0;i<(b-1);++i){
        for(j=0;j<(b-1);j++)
            if(bra[j]<bra[j+1]){
                t=bra[j];
                bra[j]=bra[j+1];
                bra[j+1]=t;
            }
    }
    for(i=0,j=0;i<a;i++)
        if(!ara[i]){ara[i]=bra[j];j++;}
    for(i=0,j=1;i<(a-1);i++)
        if(ara[i]<ara[i+1]){j++;continue;}
    if(j==(a))printf("No\n");
    else
    printf("Yes\n");
    return 0;
}

#include<stdio.h>
int main()
{
    int n,m,i,j,countzero=0,zeroindex;
    scanf("%d %d",&n,&m);
    int a[n],b[m];
    for(i=0;i<n;i++){
            scanf("%d",&a[i]);
            if(a[i]==0){
                    countzero++;
            zeroindex=i;}
            }
    for(i=0;i<m;i++)scanf("%d",&b[i]);
    if(countzero==1){
        a[zeroindex]=b[0];
        int flag=0;
        for(i=0;i<n-1;i++){
            if(a[i+1]<a[i]){flag=1;break;}
        }
        if(flag)printf("YES");
        else printf("NO");
    }
    else {
        printf("YES");
    }
    return 0;

    }

#include <stdio.h>
#include <stdlib.h>
int check_inc(int a[],int size)
{
    int i;
    for(i=0;i<size;i++)
    {
        if(a[i]>a[i+1])
            return 0;
    }
    return 1;
}
void shift_array (int a[],int size)
{
    int temp,i;
    temp=a[0];
    for(i=0;i<size-1;i++)
    {
        a[i]=a[i+1];
    }
    a[size-1]=temp;
}
int main()
{
   // int o;
    int n,k,i,j,x,v,q=0;
    scanf("%d %d",&n,&k);
    int ns[n] ,ks[k],zeros[k];
    for(i=0;i<n;i++)
    {
        scanf("%d",&ns[i]);
    }
    for(i=0;i<k;i++)
    {
        scanf("%d",&ks[i]);
    }
    for(i=0;i<k;i++)
    {
        for(j=0,v=0;j<n;j++)
        {
            if(ns[j]==0)
            {
                ns[j]=ks[v];
                zeros[v]=j;
                v++;
            }
        }
        x=check_inc(ns,n);
        if(x==0)
        {
            printf("Yes");
            q=1;
            break;
        }
        shift_array (ks,k);
        for(j=0,v=0;j<n;j++)
        {
            if(zeros[v]==j)
            {
                ns[j]=0;
                v++;
            }
        }

        /*
        printf("\n\n");
        for(o=0;o<n;o++)
            printf("%d ",ns[o]);
        */

    }
    if(q!=1)
        printf("No");
    return 0;
}

#include<stdio.h>

int main()
{
    int ara1[205],ara2[205];
    int i,j=0,kase1,kase2;

    scanf("%d%d",&kase1,&kase2);

    for(i=0;i<kase1;i++){
        scanf("%d",&ara1[i]);
    }

    for(i=0;i<kase2;i++){

        scanf("%d",&ara2[i]);
    }
    if(kase2>1){
        printf("Yes\n");
        return 0;
    }
    int c=0;
    for(i=0;i<kase2;i++){
        if(ara1[i]==0){
            c++;
        }
    }
    if(c==kase1){
        printf("Yes\n");
        return 0;
    }

    for(i=0;i<kase1;i++){
        if(ara1[i]==0){
            ara1[i]=ara2[j++];
        }
    }
    for(i=kase1-1;i>=0;i--){
        if(ara1[i]<ara1[i-1]){
            printf("Yes\n");
            return 0;
        }
    }
    printf("No\n");
    return 0;
}

#include<stdio.h>
int main()
{
    int n,k,flag=0,store;
    scanf("%d%d",&n,&k);
    int a[n],b[k],i;
    for(i=1;i<=n;i++)
    {
        scanf("%d",&a[i]);
    }
    for(i=1;i<=k;i++)
    {
        scanf("%d",&b[i]);
        store=b[i];
    }
    if(k==1)
    {
        for(i=1;i<=n;i++)
        {
            if(a[i]==0)
            {
                a[i]=store ;
               // printf("0 is changed %d\n",a[i]);
                break;
            }
        }
        for(i=1;i<=n-1;i++)
        {
            flag=0;
            if(a[i]<a[i+1])
            {
                flag=1;
            }
            else
            {
                break;
            }
        }
        if(flag==0)
        {
            printf("Yes\n");
        }
        else
        {
            printf("No\n");
        }
    }
    else
    {
        printf("Yes\n");
    }
    return 0;
}

#include<stdio.h>

int main(){

	int n ,k ,i ,c=0;
	scanf("%d%d",&n ,&k);
	int a[n] ,b[k];
	for(i=0;i<n;i++) scanf("%d",&a[i]);
	for(i=0;i<k;i++) scanf("%d",&b[i]);
	if(k>1) printf("Yes\n");
	else{
		for(i=0;i<n;i++){
			if(a[i]==0){
				a[i]=b[0];
				break;
			}
		}
		for(i=0;i<n-1;i++){
			if(a[i]>a[i+1]) {
				printf("YES");
				break;}
		}
		if(i==n-1) printf("NO");

	}

	return 0;
}

#include <stdio.h>
#include<math.h>
 long long int gcd(long long int a,long long int b);
int main(void) {
	// your code goes here
long long int n,k,i,j,s=0,c=0;
scanf("%lli %lli",&n,&k);
long long int a[n];
long long int b[n];
for(i=0;i<n;i++)
{scanf("%lli",&a[i]);
if(a[i]==0)
c++;
}
for(i=0;i<k;i++)
scanf("%lli",&b[i]);
if(c>=2)
printf("Yes\n");
else
{
    for(i=0;i<n;i++)
    {
        if(a[i]==0)
        a[i]=b[0];
    }
    for(i=0;i<n-1;i++)
    {
        if(a[i]>a[i+1])
    {
        s=1;
        break;
    }
    }
    if(s==1)
    printf("Yes\n");
    else
    printf("No\n");

}
return 0;
}

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

int sort(const void *a, const void *b)
{
    return (*(int*)b- *(int*)a);
}
int main()
{
    int n, k, i, j;
    scanf("%d%d",&n,&k);
    int a[n+1], b[k+1];
    for(i=0; i<n; i++)
        scanf("%d", &a[i]);
    for(i=0; i<k; i++)
        scanf("%d", &b[i]);
    qsort(b,k,sizeof(int),sort);

    for(i=0,j=0; i<n; i++)
    {
        if(a[i]==0)
        {
            a[i]=b[j++];
        }
        if(j==k)
            break;
    }
    for(i=0; i<n-1; i++)
    {
        if(a[i] > a[i+1])
        {
            printf("YES\n");
            return 0;
        }
    }
    printf("NO\n");
    return 0;
}

#include<stdio.h>

int main(void){
	int n,k,cnt,d,t;
	scanf("%d%d", &n,&k);
	int khobz[n],khobza[k];
	for(cnt=0;cnt<n;cnt++)
		scanf("%d", &khobz[cnt]);
	for(cnt=0;cnt<k;cnt++)
		scanf("%d", &khobza[cnt]);
	for(cnt=1;cnt<k;cnt++){
		d=cnt;
		while(d>0 && khobza[d-1]<khobza[d]){
			t=khobza[d];
			khobza[d]=khobza[d-1];
			khobza[d-1]=t;
			d--;
		}
	}
	for(cnt=0;cnt<n;cnt++){
		if(khobz[cnt]==0){
			for(d=0;d<k;d++){
				if(khobza[d]!=0){
					khobz[cnt]=khobza[d];
					khobza[d]=0;
					//d=k;
					break;
				}
			}
		}
	}
	for(cnt=0;cnt<n-1;cnt++){
		if(khobz[cnt]>khobz[cnt+1])
			break;
	}
	if(cnt==n-1)
		printf("NO");
	else
		printf("YES");
	return 0;
}

#include<stdio.h>
#include<stdlib.h>
int judge(int a[],int b[],int n,int m)
{
	int i;
	int t=0,x=0;
	for(i=0;i<n;i++)
	{
		if(a[i]==0)
		{
			a[i]=b[x];x++;
		}
	}
	for(i=0;i<n-1;i++)
	{
		if(a[i]>a[i+1])
		return 1;
	}
	return 0;
}

int comp(const void *a,const void *b)
{
	return*(int*)b-*(int*)a;
}
int main()
{
	int a[500];
	int b[500];
	int n,m;
	while(scanf("%d %d",&n,&m)!=EOF)
	{
	 	int i;
		 int c[500];
		 for(i=0;i<n;i++)
	 	 {
		 	scanf("%d",&a[i]);
			 c[i]=a[i];
		 }
		 for(i=0;i<m;i++)
		 scanf("%d",&b[i]);
		 qsort(b,m,sizeof(b[0]),comp);
		 int t=judge(a,b,n,m);
		 if(t)printf("Yes\n");
		 else
		 printf("No\n");
	}
}

#include <stdio.h>
#include <stdlib.h>
int cmp(const void* a,const void* b)
{
	return (*(int *)b - *(int *)a);
}

int main()
{
	int n,k;
	scanf("%d%d",&n,&k);
	int a[n],b[k];
	int i;
	for(i=0;i<n;i++)
	{
		scanf("%d",&a[i]);
	}
	for(i=0;i<k;i++)
	{
		scanf("%d",&b[i]);
	}
	qsort(b,k,sizeof(int),cmp);
	int j=0;
	for(i=0;i<n;i++)
	{
		if(a[i]==0)
		{
			a[i]=b[j];
			j++;
		}
	}
	int p=0;
	for(i=1;i<n;i++)
	{
		if(a[i]>a[i-1])
		{
			p++;
		}
	}
	if(p==n-1)
	{
		printf("No\n");
	}
	else
	{
		printf("Yes\n");
	}
	return 0;
}

#include<stdio.h>
#include<stdlib.h>
typedef long long int ll;

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

int main()
{
ll n,k;
scanf("%lld %lld",&n,&k);
ll a[n];
ll b[k];
ll i;
ll stamp[200+10]={0};
for(i=0;i<n;i++)
{scanf("%lld",&a[i]);
stamp[a[i]]=1;
}
for(i=0;i<k;i++)
scanf("%lld",&b[i]);
ll flag;
qsort(b,k,sizeof(ll),cmpfunc);
ll prev=0;
for(i=0;i<n;i++)
{
if(a[i]==0)
{
while(prev<k)
{
if(b[prev]!=0)
{a[i]=b[prev];prev++;break;}
prev++;
}
}
}
for(i=0;i<n-1;i++)
if(a[i]>a[i+1])
{printf("Yes\n");return 0;}
printf("No\n");
return 0;
}

#include <stdio.h>

int main()
{
   int n, m;
   scanf("%d %d", &n, &m);
   if(m>1)printf("YES");
   else
   {
       int x[202], y, i;
       for(i=1; i<=n; i++)scanf("%d", &x[i]);
       scanf("%d", &y), x[0]=0;
       for(i=1; i<=n; i++)
       {
           if(x[i]==0)x[i]=y;
           if(x[i]<x[i-1])break;
       }
       if(i==n+1)printf("NO");
       else printf("YES");
   }
}

#include<stdio.h>
int main()
{
    int n,m;
    scanf("%d %d",&n,&m);
    int i,temp=0,temp1=0,flag=0;
    int myarray[n],myarray1[m];
    for(i=0; i<n; i++)
    {
        scanf("%d",&myarray[i]);
        if(myarray[i]==0)
        {
            temp++;
            temp1=i;
        }
    }
    for(i=0; i<m; i++)
    {
        scanf("%d",&myarray1[i]);
    }
    if(temp==1)
    {
        myarray[temp1]=myarray1[0];
        for(i=0; i<n-1; i++)
        {
            if(myarray[i+1]<myarray[i])
            {
                flag=1;
            }
        }
        if(flag)
        {
            printf("YES");
        }
        else
        {
            printf("NO");
        }
    }
    else
    {
        printf("YES");
    }
    return 0;

}

#include<stdio.h>

int main()
{
    int n,k;
    scanf("%d%d",&n,&k);
    int a[n],i;
    for(i=0;i<n;i++)
    scanf("%d",&a[i]);
    int b[k];
    for(i=0;i<k;i++)
    scanf("%d",&b[i]);

    if(k==1)
    {
    for(i=0;i<n;i++)
    if(a[i]==0)
    a[i]=b[0];

    int c=0;
    for(i=0;i<n-1;i++)
    {
   // printf("%d ",a[i]);
    if(a[i+1]<a[i])
    c++;
    }

    if(c>0)
    printf("YES");
    else
    printf("NO");
    }
    else
    printf("YES");

    return 0;
}

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

int cmpfunc (const void * a, const void * b)
{
    if( *(long long int*)a - *(long long int*)b < 0 )
        return -1;
    if( *(long long int*)a - *(long long int*)b > 0 )
        return 1;
    if( *(long long int*)a - *(long long int*)b == 0 )
        return 0;
}

int main(){
    int n, k;
    scanf("%d %d", &n, &k);
    int a[n], x;
    if (k > 1) printf("Yes\n");
    else {
        int idx;
        for (int i = 0; i < n; i++) {
            scanf("%d", &a[i]);
            if (!a[i]) idx = i;
        }
        scanf("%d", &x);
        a[idx] = x;
        for (int i = 1; i < n; i++){
            if (a[i] < a[i - 1]){
                printf("Yes\n");
                return 0;
            }
        }
        printf("No\n");
    }
    return 0;
}

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

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

	int *A = (int *) malloc(a*sizeof(int));
	int *B = (int *) malloc(b*sizeof(int));

	for(int i=0;i<a;i++)
		scanf("%d", A+i);

	for(int i=0;i<b;i++)
		scanf("%d", B+i);

	if(b>1)
	{
		printf("YES\n");
		return 0;
	}

	else
	{
		for(int i=0;i<a;i++)
			if(!A[i])
			{
				A[i] = *B;
				break;
			}

		for(int i=0;i<a-1;i++)
			if(A[i] > A[i+1])
			{
				printf("YES\n");
				return 0;
			}
	}

	printf("NO\n");

	return 0;
}

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

int main()
{
    int n,m;
    scanf("%d %d",&n,&m);
    if(m>1)
    {
        int temp;
        for(int i=0; i<n; i++)
            scanf("%d",&temp);
        for(int i=0; i<m; i++)
            scanf("%d",&temp);
        printf("YES");
    }
    else
    {
        int arr[n],k,flag=0;
        for(int i=0; i<n; i++)
        {
            scanf("%d",&arr[i]);
            if(arr[i]==0)
                k=i;
            else
            {
                if(i!=0&&arr[i]<arr[i-1])
                    flag=1;
            }
        }
        int temp;
        scanf("%d",&temp);
        if(flag==1)
        {
            printf("YES");
            return 0;

        }
        if(k!=0&&k<n-1)
        {
            if(temp>=arr[k-1]&&temp<=arr[k+1])
                printf("NO");
            else
                printf("YES");
        }
        else if(k==0)
        {
            if(temp<=arr[k+1])
                printf("NO");
            else
                printf("YES");
        }
        else if(k==n-1)
        {
            if(temp>=arr[k-1])
                printf("NO");
            else
                printf("YES");
        }
    }
    return 0;
}

#include <stdio.h>

int a[200];
int b[200];
int main()
{
    int i, index, n, k;
    scanf("%d %d", &n, &k);

    for(i = 0; i < n; i++)
    {
        scanf("%d", &a[i]);
        if(k == 1)
        {
            if(a[i] == 0)
                index = i;
        }
    }
    for(i = 0; i < k; i++)
    {
        scanf("%d", &b[i]);
    }
    if(k == 1)
    {
        a[index] = b[0];
        for(i = 1; i < n; i++)
        {
            if(a[i-1] > a[i])
                break;
        }
        if(i == n)
            printf("No");
        else
            printf("Yes");
    }
    else
        printf("Yes");
    return 0;
}

#include<stdio.h>
#define MAX 100

// A utility function to swap two elements
void swap(int* a, int* b)
{
    int t = *a;
    *a = *b;
    *b = t;
}

/* This function takes last element as pivot, places
   the pivot element at its correct position in sorted
    array, and places all smaller (smaller than pivot)
   to left of pivot and all greater elements to right
   of pivot */
int partition (int arr[], int low, int high)
{
    int pivot = arr[high];    // pivot
    int i = (low - 1);  // Index of smaller element

    for (int j = low; j <= high- 1; j++)
    {
        // If current element is smaller than or
        // equal to pivot
        if (arr[j] >= pivot)
        {
            i++;    // increment index of smaller element
            swap(&arr[i], &arr[j]);
        }
    }
    swap(&arr[i + 1], &arr[high]);
    return (i + 1);
}

/* The main function that implements QuickSort
 arr[] --> Array to be sorted,
  low  --> Starting index,
  high  --> Ending index */
void quickSort(int arr[], int low, int high)
{
    if (low < high)
    {
        /* pi is partitioning index, arr[p] is now
           at right place */
        int pi = partition(arr, low, high);

        // Separately sort elements before
        // partition and after partition
        quickSort(arr, low, pi - 1);
        quickSort(arr, pi + 1, high);
    }
}

/* Function to print an array */
void printArray(int arr[], int size)
{
    int i;
    for (i=0; i < size; i++)
        printf("%d ", arr[i]);
    printf("\n");
}

int isAscending(int a[], int size ){
    int i;
    for(i = 1; i<size; i++){
        if(a[i-1] > a[i])
            return 0;
    }
    return 1;
}

// Driver program to test above functions
int main()
{
    // int arr[] = {1,2, 3, 4, 5};
    // int n = sizeof(arr)/sizeof(arr[0]);
    // quickSort(arr, 0, n-1);
    // printf("Sorted array: \n");
    // printArray(arr, n);

    int n, k, a[MAX], b[MAX], sample[201], i, flag, j;
    scanf("%d", &n); // Number of elements in `a`
    scanf("%d", &k); // Number of elements in `b`

    for(i = 0; i < n; i++){
        scanf("%d",&a[i]);
    }

    for(i = 0; i < k; i++){
        scanf("%d",&b[i]);
    }

    for(i = 0; i < 200; i++){
        sample[i] = 0;
    }

    flag = 1;
    quickSort(b, 0, k-1);
    j = 0;
    if(k == 1){
        for(i = 0; i < n; i++){
            if(a[i] == 0){
                if(sample[b[j]] == 0){
                    sample[b[j]] = 1;
                    a[i] = b[j];
                    j++;
                }
                else{
                    flag = 0;
                    break;
                }

            }

        }

        if(isAscending(a, n))
            flag = 0;

    }

    else{

        for(i = 0; i < n; i++){
            if(a[i] == 0){
                if(sample[b[j]] == 0){
                    sample[b[j]] = 1;
                    a[i] = b[j];
                    j++;
                }
                else{
                    flag = 0;
                    break;
                }

            }

        }
    }

    if(!flag)
        printf("No");
    else
        printf("Yes");

    return 0;
}

#include<stdio.h>
#include<stdlib.h>
int cmpfnc(const void *a,const void *b){
    if(*(int *)a==*(int *)b) return 0; else return *(int *)b-*(int *)a;
}
int main(){
    int n,k;scanf(" %d%d",&n,&k);
    int i,j=0,jk,a[n],b[k],min=0;
    for(i=0;i<n;i++){scanf(" %d",&a[i]);if(a[i]==0)jk=i;}
    for(i=0;i<k;i++)scanf(" %d",&b[i]);
    if(k==1){
        a[jk]=b[0];
        for(i=0;i<n;i++){if(a[i]<=min){j++;break;}min=a[i];}
        j>0? printf("Yes"):printf("No");
    }
    else puts("Yes");
    return 0;
}

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

int arr[104], get[104], zero[104];

int main() {
	int n, k, i, j, zerocnt = 0, zeroinx,fl;

	scanf("%d%d", &n, &k);

	for (i = 0; i < n; i++) {
		scanf("%d", &arr[i]);
		if(arr[i] == 0)
		zerocnt++;
	}

	for (i = 0; i < k; i++) {
		scanf("%d", &get[i]);
	}
	if (zerocnt >= 2) {
		printf("Yes\n");
	}
	else if (zerocnt == 1) {

		for (i = 0; i < n; i++) {
			if (arr[i] == 0)
				arr[i] = get[0];
		}
		fl = 0;

		for (i = 0; i < n-1; i++) {
			if (arr[i] > arr[i + 1]) {
				fl = 1;
				break;
			}
		}

		if (fl == 0)printf("No\n");
		else  printf("Yes\n");
	}
}

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

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

int main()
{
    int a[100], b[100];
    int n, k;
    scanf("%d %d", &n, &k);
    for(int i = 0; i < n; ++i) {
        scanf("%d", &a[i]);
    }
    for(int i = 0; i < k; ++i) {
        scanf("%d", &b[i]);
    }
    qsort(b, k, sizeof(int), cmp);
    for(int i = 0; i < n; ++i) {
        if(a[i] == 0 && k) {
            a[i] = b[k - 1];
            --k;
        }
    }
    for(int i = 1; i < n; ++i) {
        if(a[i] < a[i - 1]) {
            puts("Yes");
            return 0;
        }
    }
    puts("No");
    return 0;
}

#include <stdio.h>
int main()
{
	int n,m;
	int i,j;
	scanf("%d %d",&n,&m);
	int a[n],b[m],count=0,flag=0,prev,ans=0;
	for(i=0;i<n;i++)
	{
		scanf("%d",&a[i]);
		if(a[i]==0)
			count++;
	}
	for(i=0;i<m;i++)
		scanf("%d",&b[i]);
	if(count==m&&count>1)
		ans=1;
	if(m!=count)
		ans=0;
	if(count==1&&m==1)
	{
		for(i=0;i<n;i++)
		{
			if(a[i]==0)
				a[i]=b[0];
		}
		for(i=1;i<n;i++)
		{
			if(a[i]<a[i-1])
				ans=1;
		}
	}
	if(ans==1)
		printf("Yes\n");
	else
		printf("No\n");
	return 0;
}

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

int main()
{
    int n,k,a[201],b[200],i,j,l=0,count=0;
    scanf("%d%d",&n,&k);
    for(i=0;i<n;i++)
    {
        scanf("%d",&a[i]);
    }
    for(i=0;i<k;i++)
    {
        scanf("%d",&b[i]);
    }

    if(k>1)
    {
        printf("Yes\n");
        return 0;
    }
    else{
        for(i=0;i<n;i++)
        {
            if(a[i]==0)
                a[i]=b[0];
            if(i<n-1){
                if(a[i+1]==0)
                    a[i+1]=b[0];
            if(a[i]>a[i+1]){
                printf("Yes\n");
                return 0;
            }
            }
    }
    }

    printf("No\n");
    return 0;
}

#include<stdio.h>

int *sort(int ara[],int n)
{
    int i,j,temp;
    for(i=0;i<n;i++)
    {
        for(j=i+1;j<n;j++)
        {
            if(ara[j]>ara[i])
            {
                temp = ara[i];
                ara[i] = ara[j];
                ara[j] = temp;
            }
        }
    }
    return ara;
}

int main()
{
    int n,k,i,j;
    scanf("%d %d",&n,&k);
    int ara1[n],ara2[k];
    for(i=0;i<n;i++)
    {
        scanf("%d",&ara1[i]);
    }
    for(j=0;j<k;j++)
    {
        scanf("%d",&ara2[j]);
    }

    int *ara3 = sort(ara2,k);
    j = 0;

    for(i=0;i<n;i++)
    {
        if(ara1[i] == 0)
        {
            ara1[i] = ara3[j];
            j++;
        }
    }

    int flag = 0;
    for(i=0;i<n;i++)
    {
        if(ara1[i] > ara1[i+1])
        {
            flag = 1;
            break;
        }
    }
    if(flag == 1) printf("Yes");
    else printf("No");

    return 0;
}

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

int compare(const void *a, const void *b) {
    if (*(int *)a < *(int *)b) {
        return 1;
    } else if (*(int *)a > *(int *)b) {
        return -1;
    } else {
        return 0;
    }
}

int main(void) {
    int n = 0, k = 0, i = 0;
    int a[101] = {0, }, b[101] = {0, };
    int zeroIndex[101] = {0, }, zeroCnt = 0;

    scanf("%d %d", &n, &k);
    for (i=0;i<n;i++) {
        scanf("%d", &a[i]);
        if (a[i] == 0) {
            zeroIndex[zeroCnt++] = i;
        }
    }

    for (i=0;i<k;i++) {
        scanf("%d", &b[i]);
    }

    qsort(b, k, sizeof(int), compare);

    for (i=0;i<zeroCnt;i++) {
        a[zeroIndex[i]] = b[i];
    }

    char flag = 1;
    for (i=0;i<n-1;i++) {
        if (a[i] >= a[i + 1]) {
            flag = 0;
            break;
        }
    }

    if (flag) {
        printf("No\n");
    } else {
        printf("Yes\n");
    }

    return 0;
}

#include<stdio.h>
int main(){
	int n,k,count=0,flag=0,min,max;
	int num1[105],num2[105];
	scanf("%d%d",&n,&k);
	scanf("%d",&num1[0]);
	for(int i=1;i<n;i++){
		scanf("%d",&num1[i]);
		if(num1[i]!=0 && num1[i]<num1[i-1])
			flag=1;
	}
	scanf("%d",&num2[0]);
	min=max=num2[0];
	for(int i=1;i<k;i++){
		scanf("%d",&num2[i]);
		if(num2[i]<min)
			min=num2[i];
		if(num2[i]>max)
			max=num2[i];
	}
	if(flag || k>1){
		printf("Yes\n");
		return 0;
	}
	if(num1[0]==0){
		if(max<num1[1])
			printf("No\n");
		else
			printf("Yes\n");
	}
	else if(num1[n-1]==0){
		if(num1[n-2]<min)
			printf("No\n");
		else
			printf("Yes\n");
	}
	else{
		for(int i=1;i<n-1;i++)
			if(num1[i]==0){
				if(num1[i+1]>max && num1[i-1]<min)
					printf("No\n");
				else
					printf("Yes\n");
				break;
			}

	}
}

#include <stdio.h>
#include <stdlib.h>
int cmp(const void* a,const void* b)
{
	return (*(int *)b - *(int *)a);
}

int main()
{
	int n,k;
	scanf("%d%d",&n,&k);
	int a[n],b[k];
	int i;
	for(i=0;i<n;i++)
	{
		scanf("%d",&a[i]);
	}
	for(i=0;i<k;i++)
	{
		scanf("%d",&b[i]);
	}
	qsort(b,k,sizeof(int),cmp);
	int j=0;
	for(i=0;i<n;i++)
	{
		if(a[i]==0)
		{
			a[i]=b[j];
			j++;
		}
	}
	int p=0;
	for(i=1;i<n;i++)
	{
		if(a[i]>a[i-1])
		{
			p++;
		}
	}
	if(p==n-1)
	{
		printf("No\n");
	}
	else
	{
		printf("Yes\n");
	}
	return 0;
}

#include<stdio.h>
int cmp(const void*x,const void*y){
    return *(int*)y - *(int*)x ;
}
int main(){
    int i,j=0,n,k,a[100],b[100];
    scanf("%d%d",&n,&k);
    for(i=0;i<n;i++)
        scanf("%d",&a[i]);
    for(i=0;i<k;i++)
        scanf("%d",&b[i]);
    qsort(b,k,sizeof(int),cmp);
    for(i=0;i<n;i++){
        if(a[i]==0) {  a[i]=b[j];   j++;  }
    }
    for(i=1;i<n;i++){
        if(a[i]<a[i-1]){  printf("Yes");    return 0;  }
    }
    printf("No");    return 0;
}

#include<stdio.h>
#include<stdlib.h>
int check(int [],int );
int fun(int [],int ,int [],int );
int check(int a[],int n)
{
    int i;
    for(i=1;i<n;i++)
    {
        if(a[i-1]>a[i])
        {
            return 0;
        }
    }
    return 1;
}
int fun(int a[],int n,int b[],int m)
{
    int i;
    if(m>=2)
    {
        return 1;
    }
    for(i=0;i<n;i++)
    {
        if(a[i]==0)
        {
            a[i]=b[0];
            break;
        }
    }
    if(check(a,n)==1)
    {
        return 0;
    }
    return 1;
}
int main()
{
    int a[101];
    int b[101];
    int n,m,i;
    scanf("%d%d",&n,&m);
    for(i=0;i<n;i++)
    {
        scanf("%d",&a[i]);
    }
    for(i=0;i<m;i++)
    {
        scanf("%d",&b[i]);
    }
    printf((fun(a,n,b,m)==1)?"Yes\n":"No\n");
    return 0;
}

#include<stdio.h>
#include<stdlib.h>
int cmp(const void*x,const void*y){
    return *(int*)y - *(int*)x ;
}
int main(){
    int i,j=0,n,k,a[100],b[100];
    scanf("%d%d",&n,&k);
    for(i=0;i<n;i++)
        scanf("%d",&a[i]);
    for(i=0;i<k;i++)
        scanf("%d",&b[i]);
    qsort(b,k,sizeof(int),cmp);
    for(i=0;i<n;i++){
        if(a[i]==0) {
            a[i]=b[j];
            j++;
        }
    }
    for(i=1;i<n;i++){
        if(a[i]<a[i-1]){
            printf("Yes\n");
            return 0;
        }
    }
    printf("No\n");
    return 0;
}

#include<stdio.h>

int main()
{
	int n, k, i, temp, index = 0;
	scanf("%d %d", &n, &k);
	int *a, *b;

	a = (int*)malloc(sizeof(int) * n);
	b = (int*)malloc(sizeof(int) * k);

	for(i = 0; i < n; i++) scanf("%d", &a[i]);
	for(i = 0; i < k; i++) scanf("%d", &b[i]);

/*	for(i = 1; i < n; i++) {
		if(a[i] && (a[i] < a[i - 1])) {
			printf("YES\n");
			return 0;
		}
	}*/

	temp = 0;

	for(i = 0; i < k; i++) {
		if(temp < b[i]){
			temp = b[i];
			index = i;
		}
	}

	b[index] = 0;

	for(i = 0; i < n; i++) {
		if(!a[i]) {
			a[i] = temp;
			break;
		}
	}

	temp = 0;

	for(i = 0; i < k; i++) {
		if(temp < b[i]){
			temp = b[i];
		}
	}

	for(i = 0; i < n; i++) {
		if(!a[i]) {
			a[i] = temp;
			break;
		}
	}

	for(i = 0; i < n - 1; i++) {
		if(a[i] > a[i + 1]) {
			printf("YES\n");
			break;
		}
	}

	if(i == n - 1) printf("NO\n");

	return 0;

}

#include<stdio.h>
int main()
{
    int n,k,flag=0;
    scanf("%d %d",&n,&k);
    int a[n],b[k];
    for(int i=0;i<n;i++)
     scanf("%d ",&a[i]);
     for(int i=0;i<k;i++)
     scanf("%d ",&b[i]);
     if(a[0]==0)
       a[0]=b[0];
     if(k>1)
     printf("Yes");

     else
       {
         for(int i=0;i<n-1;i++)
            {
                    if(a[i+1]==0)
                       a[i+1]=b[0];
                    if(a[i+1]<a[i])
                      {flag=1;break;}
            }
        if(flag==0)
          printf("No");
        else printf("Yes");
       }
       return 0;

}

#include <stdio.h>
#include <stdlib.h>
void merge(int arr[],int l,int m,int r)
{
    int i, j, k;
    int n1 = m - l + 1;
    int n2 =  r - m;

    int L[n1], R[n2];

    for (i = 0; i < n1; i++)
        L[i] = arr[l + i];
    for (j = 0; j < n2; j++)
        R[j] = arr[m + 1+ j];

    i = 0;
    j = 0;
    k = l;
    while (i < n1 && j < n2)
    {
        if (L[i] >= R[j])
        {
            arr[k] = L[i];
            i++;
        }
        else
        {
            arr[k] = R[j];
            j++;
        }
        k++;
    }
    while (i < n1)
    {
        arr[k] = L[i];
        i++;
        k++;
    }
    while (j < n2)
    {
        arr[k] = R[j];
        j++;
        k++;
    }
}

void mergeSort(int arr[],int l,int r)
{
    if (l < r)
    {
        int m = l+(r-l)/2;
        mergeSort(arr, l, m);
        mergeSort(arr, m+1, r);

        merge(arr, l, m, r);
    }
}
int main()
{
	int n,k,i,j,flag=0,c=0;
	scanf("%d%d",&n,&k);
	int *a=malloc(n*sizeof(int));
	int *b=malloc(k*sizeof(int));
	for(i=0;i<n;i++)
		scanf("%d",&a[i]);
	for(i=0;i<k;i++)
		scanf("%d",&b[i]);
	mergeSort(b,0,k-1);
	j=0;
	for(i=0;i<n;i++)
		if(a[i]==0)
			a[i]=b[j++];
	for(i=1;i<n;i++)
		if(a[i-1]<a[i])
			c++;
	/*printf("%d\n",c);
		for(i=1;i<n;i++)
			printf("%d\t",a[i]);
	printf("\n");*/
	if(c==n-1)
		printf("No\n");
	else
		printf("Yes\n");
	return 0;
}

#include <stdio.h>

int main()

{

    int n , k , i , j ;

    scanf("%d %d",&n,&k) ;

    int ara[n] , bra[k] ;

    for( int x = 0 ; x < n ; x++ )  scanf("%d",&ara[x]) ;

    for( int y = 0 ; y < k ; y++ )  scanf("%d",&bra[y]) ;

    int key ;

    if( k == 1 )  {

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

           if( ara[a] == 0 )  {

               ara[a] = bra[0] ;

               break ;

           }

       }

       for( i = 0 , j = 1 ; j < n ; i++ , j++ )  {

           if( ara[i] > ara[j] )  {

               printf("Yes\n") ;

               return 0 ;

           }

       }

       printf("No\n") ; return 0 ;

    }

    printf("Yes\n") ;

    return 0 ;

}

#include<stdio.h>
#include<math.h>
#include<stdlib.h>
#include<string.h>
int main()
  {
     int n,k,i,j;
	 scanf("%d %d",&n,&k);
	 int a[n],b[k];
	 for(i=0;i<n;i++)
	 {
		 scanf("%d",&a[i]);
	 }
	 for(i=0;i<k;i++)
	 {
		 scanf("%d",&b[i]);
		 if(i){
		 for(j=0;j<i;j++)
		 {
			 if(b[i]>b[j]){
				 int temp=b[i];
				 b[i]=b[j];
				 b[j]=temp;
			 }
		 }
		 }
	 }
	 int check=0;
	 for(i=0;i<n;i++)
	 {
		 if(a[i]==0){
			 a[i]=b[check];
			 check++;
		 }
	 }

	  int count;
	 for(i=0;i<n-1;i++)
	 {
		 for(j=i+1;j<n;j++)
		 {
			 if(a[i]<a[j]){
				 count=1;
			 }
			 else{
				 count=0;
				 break;
			 }
		 }
		 if(count==0){
			 break;
		 }
	 }
	 // printf("%d",count);
	 if(count==1){
		 printf("NO");
	 }
	 if(count==0){
		 printf("YES");
	 }
	   return 0;
	    }

#include <stdio.h>
#include <limits.h>

int a[100];

int main() {
  int n, k;
  scanf("%d%d", &n, &k);
  if (k >= 2) {
    printf("Yes");
    return 0;
  }
  int zero_index;
  int sorted = 1;
  for (int i = 0; i < n; ++i) {
    scanf("%d", a + i);
    if (a[i] == 0) zero_index = i;
    if (i != 0 && i != zero_index && a[i] <= a[i-1]) sorted = 0;
  }
  int b;
  scanf("%d", &b);
  if (sorted) {
    if (zero_index == 0 && b < a[1] ||
        zero_index == n - 1 && a[zero_index - 1] < b ||
        zero_index != 0 && zero_index != n - 1 && a[zero_index - 1] < b && b < a[zero_index + 1]) {
      printf("No");
      return 0;
    }
  }
  printf("Yes");
  return 0;
}

#include<stdio.h>
#include<stdlib.h>
int n,k,*arr,*brr;
int main()
{ int tr=0;
scanf("%d%d",&n,&k);
    arr=(int*)malloc(sizeof(int)*n);
    int temp=0;
    while(temp<n)scanf("%d",&arr[temp++]);
    brr=(int*)malloc(sizeof(int)*k);
    temp=0;
    while(temp<k)scanf("%d",&brr[temp++]);
    if(temp>1)printf("Yes");
else
{
int t=0;
while(arr[t]!=0)t++;
arr[t]=brr[0];
t=1;
while(t!=n)
{
    if(arr[t]>arr[t-1])tr++;
t++;
}
if(tr==n-1)printf("No");
    else printf("Yes");

}

free(arr);free(brr);
}

#include<stdio.h>
#include<stdlib.h>
int judge(int a[],int b[],int n,int m);
int comp(const void *a,const void *b)
{
    return *(int *)b-*(int *)a;
}
int main()
{
	int a[500];
	int b[500];
	int n,m;
	while(scanf("%d %d",&n,&m)!=EOF)
	{
		int i;	int c[500];
		for(i=0;i<n;i++)
		{
			scanf("%d",&a[i]);
			c[i]=a[i];
		}
		for(i=0;i<m;i++)
			scanf("%d",&b[i]);
		qsort(b,m,sizeof(b[0]),comp);
		int t=judge(a,b,n,m);
		if(t)
			printf("Yes\n");
		else
			printf("No\n");
	}
}
int judge(int a[],int b[],int n,int m)
{

	int i;
	int t=0,x=0;

	for(i=0;i<n;i++)
	{
		if(a[i]==0)
		{
			a[i]=b[x];
			x++;
		}
	}
	for(i=0;i<n-1;i++)
	{
		if(a[i]>a[i+1])
		return 1;
	}
	return 0;
}

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

int main()
{
    int n,k,i,t,b;
    scanf("%d%d",&n,&k);
    int a[102];
    for(i=0;i<n;i++)
    {
        scanf("%d",&a[i]);
        if(a[i]==0)
            t=i;
    }
    scanf("%d",&b);
    a[t]=b;
    for(i=0;i<n-1;i++)
    {
        if(a[i]>a[i+1])
        {
            printf("Yes\n");
            return 0;
        }
    }
    if(k!=1)
    {
        printf("Yes\n");
        return 0;
    }
    printf("No\n");
    return 0;
}

#include<stdio.h>
void merge(int arr_1[],int arr_2[],int size,int arr_3[])
    {
    int i=0,j=0,k=0,size_i=(size+1)/2,size_j=size-size_i;
    while(k<size)
        {
        if((arr_1[i]<=arr_2[j]||i==size_i)&&j!=size_j)
            arr_3[k++]=arr_2[j++];
        else
            arr_3[k++]=arr_1[i++];
    }
}
void merge_sort(int a[],int start,int end,int a_1[])
    {
    int size=end-start+1;
    if(start==end)
        a_1[0]=a[start];
    else
        {
        int mid=(start+end)/2;
        int arr_1[mid-start+1],arr_2[end-mid];
        merge_sort(a,start,mid,arr_1);
        merge_sort(a,mid+1,end,arr_2);
        merge(arr_1,arr_2,size,a_1);
    }
}
int main()
{
	int n,k;
	scanf("%d%d",&n,&k);
	int a[n],b[k],b_1[k];
	for(int i=0;i<n;i++)
	scanf("%d",&a[i]);
	for(int i=0;i<k;i++)
	scanf("%d",&b_1[i]);
	merge_sort(b_1,0,k-1,b);
	int j=0;
	for(int i=0;i<n;i++)
	{
		if(a[i]==0&&j<k)
		{
		a[i]=b[j];
		j++;
		}
	}
	int check=0;
	//for(int i=0;i<n;i++)
	//printf("%d ",a[i]);
	//printf("\n");
	for(int i=0;i<n-1;i++)
	{
		if(a[i]>a[i+1])
		{
			check=1;
			break;
		}
	}
	if(check==1)
	printf("Yes");
	else
	printf("No");
}

#include <stdio.h>

#define MAX_LENGTH 100 + 1
#define true 1
#define false 0

int main()
{
    int a[MAX_LENGTH], missing_number, zero_index = -1, no_of_zeroes, entire_length,i, is_possible = false;
    scanf("%d %d",&entire_length, &no_of_zeroes);

    for(i = 0; i < entire_length; i++)
    {
        scanf("%d", &a[i]);

        if(a[i] == 0)
            zero_index = i;
        else if(i > 0 && a[i] <= a[i - 1])
            is_possible = true;

    }
    for(i = 0; i < no_of_zeroes; i++)
        scanf("%d",&missing_number);

    //If there is more than one zero, it is always possible to make the sequence non-increasing.
    if(no_of_zeroes > 1)
    {
        is_possible = true;
    }
    else
    {
        if(zero_index == 0)
        {
            if(missing_number >= a[zero_index + 1])
                is_possible = true;
        }
        else if(zero_index == entire_length - 1)
        {
            if(missing_number <= a[zero_index - 1])
                is_possible = true;
        }
        else if(missing_number >= a[zero_index + 1] || missing_number <= a[zero_index - 1])
        {
            is_possible = true;
        }
    }

    printf(is_possible ? "Yes\n" : "No\n");
    return 0;
}

#include<stdio.h>

int main(){

	int n ,k ,i ,c=0;
	scanf("%d%d",&n ,&k);
	int a[n] ,b[k];
	for(i=0;i<n;i++) scanf("%d",&a[i]);
	for(i=0;i<k;i++) scanf("%d",&b[i]);
	if(k>1) printf("Yes\n");
	else{
		for(i=0;i<n;i++){
			if(a[i]==0){
				a[i]=b[0];
				break;
			}
		}
		for(i=0;i<n-1;i++){
			if(a[i]>a[i+1]) {
				printf("YES");
				break;}
		}
		if(i==n-1) printf("NO");

	}

	return 0;
}

#include<stdio.h>

int main()
{
    int n,k;
    scanf("%d%d",&n,&k);
    int a[n],i;
    for(i=0;i<n;i++)
    scanf("%d",&a[i]);
    int b[k];
    for(i=0;i<k;i++)
    scanf("%d",&b[i]);

    if(k==1)
    {
    for(i=0;i<n;i++)
    if(a[i]==0)
    a[i]=b[0];

    int c=0;
    for(i=0;i<n-1;i++)
    {
   // printf("%d ",a[i]);
    if(a[i+1]<a[i])
    c++;
    }

    if(c>0)
    printf("YES");
    else
    printf("NO");
    }
    else
    printf("YES");

    return 0;
}

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

int main()
{
    int n,k;
    scanf("%d",&n);
    scanf("%d",&k);
    int a[n],b[k];
    int i,flag=0;
    for (i=0;i<n;i++)
        scanf("%d",&a[i]);

    for (i=0;i<k;i++)
        scanf("%d",&b[i]);

    if (k>1)
        printf("Yes");
    else
    {
        if (k==1)
            for (i=0;i<n;i++)
                if (!a[i]) {
                    a[i]=b[0]; break; }
        for (i=0;i<n-1;i++)
            if (a[i]>a[i+1])
                { flag=1; break; }
        if (flag)
            printf("Yes");
        else
            printf("No");
    }
    return 0;
}

#include<stdio.h>
#define N 102
int main(){
    int a[N];
    int b[N];
    int n,k;
    scanf("%d%d",&n,&k);
    int i;
    for(i=0;i<n;i++){
        scanf("%d",&a[i]);
    }
    for(i=0;i<k;i++){
        scanf("%d",&b[i]);
    }
    int tmp=a[0];
    int increase=1;
    for(i=1;i<n;i++){
        if(a[i]!=0){
           if(tmp<=a[i]){
            tmp=a[i];
           }else{
               increase=0;
               break;
           }
        }
    }
    //printf("increase\n");
    int max=b[0];
    int min=b[0];
    for(i=1;i<k;i++){
        if(max<b[i])max=b[i];
        if(min>b[i])min=b[i];
    }
    if(k!=1){
        if(max!=min){
            increase=0;
        }else{
            for(i=0;i<n;i++){
                if(a[i]==0){
                    a[i]=b[0];
                }
            }
            for(i=1;i<n;i++){
                if(a[i-1]>a[i]){
                    increase=0;
                }
            }
        }
    }else{
        for(i=0;i<n;i++){
            if(a[i]==0){
                a[i]=b[0];
            }
        }
        for(i=1;i<n;i++){
            if(a[i-1]>a[i]){
                increase=0;
            }
        }
    }
    if(increase)
        printf("NO\n");
    else
        printf("YES\n");

    return 0;
}

#include <stdio.h>

int main()
{
   int n, m;
   scanf("%d %d", &n, &m);
   if(m>1)printf("YES");
   else
   {
       int x[202], y, i;
       for(i=1; i<=n; i++)scanf("%d", &x[i]);
       scanf("%d", &y), x[0]=0;
       for(i=1; i<=n; i++)
       {
           if(x[i]==0)x[i]=y;
           if(x[i]<x[i-1])break;
       }
       if(i==n+1)printf("NO");
       else printf("YES");
   }
}

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

int main()
{
    int i, j,n, k, sortflag = 0;
    scanf("%d %d", &n, &k);
    int a[n], b[k], c[n];
    for(i = 0; i < n; ++i)
        scanf("%d", &a[i]);

    for(i = 0; i < k; ++i)
        scanf("%d", &b[i]);

    for(i = 0; i < k - 1; ++i) {
        for(j = i + 1; j < k; ++j) {
            if(b[i] < b[j]) {
                b[i] = b[i] ^ b[j];
                b[j] = b[i] ^ b[j];
                b[i] = b[i] ^ b[j];
            }
        }
    }
    j = 0;
    for(i = 0; i < n; ++i) {
        if(a[i] != 0) c[i] = a[i];
        else {
                c[i] = b[j], j++;
        }
    }
    for(i = 0; i < n - 1; ++i) {
        if(c[i] > c[i + 1]) {
            sortflag = 1;
            break;
        }
    }
//    for(i = 0; i < n; ++i) printf("%d ", c[i]);
    if(sortflag == 0) printf("No");
    else printf("Yes");

    return 0;
}

#include<stdio.h>
int main()
{
    int n,m,i,j,countzero=0,zeroindex;
    scanf("%d %d",&n,&m);
    int a[n],b[m];
    for(i=0;i<n;i++){
            scanf("%d",&a[i]);
            if(a[i]==0){
                    countzero++;
            zeroindex=i;}
            }
    for(i=0;i<m;i++)scanf("%d",&b[i]);
    if(countzero==1){
        a[zeroindex]=b[0];
        int flag=0;
        for(i=0;i<n-1;i++){
            if(a[i+1]<a[i]){flag=1;break;}
        }
        if(flag)printf("YES");
        else printf("NO");
    }
    else {
        printf("YES");
    }
    return 0;

    }

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

    int n,k,i,j,idx,zero=0,is_increase=0,b_num=0,match=0;
    scanf("%d %d",&n,&k);
    int a[n],b[k];
    for(i=0;i<n;i++)
    {
        scanf("%d",&a[i]);
        if(a[i]==0) {
            zero++;
            idx=i;
        }

    }
    for(i=0;i<k;i++)
    {
        scanf("%d",&b[i]);
    }
    if(zero==n) printf("Yes");
    else if(zero==1) {
        a[idx]=b[0];
        for(i=0;i<n;i++)
        {
            if(a[i]==b[0]) b_num++;
            if(i>0 &&(a[i]<a[i-1])) is_increase=1;
        }
        if(b_num==1 && is_increase==1) printf("Yes");
        else printf("No");
    }
    else if(zero>1){
        //printf("pop");
        for(i=0;i<k;i++){
            for(j=0;j<n;j++){
                if(b[i]==a[j]) {match=1;break;}
            }
        }
        if(match==1) printf("No");
        else printf("Yes");
    }
}

#include <stdio.h>
#define A_MAX 100 + 1
#define B_MAX 100 + 1

int main()
{
	int n, k;
	int a[A_MAX], b[B_MAX];
	while (scanf("%d %d", &n, &k) != EOF)
	{
		int i, j;
		for (i = 0; i < n; ++i)
		{ scanf("%d", &a[i]); }
		for (i = 0; i < k; ++i)
		{ scanf("%d", &b[k]); }
		if (k > 1) { puts("Yes\n"); }
		else
		{
			for (i = 0; i < n; ++i)
			{
				if (!a[i]) { break; }
			}
			if (b[k] > a[i - 1] && b[k] < a[i + 1])
			{
				int flag = 0;
				a[i] = b[k];
				for (j = 0; j < n - 1; ++j)
				{
					if (a[j] > a[j + 1])
					{
						flag = 1; break;
					}
				}
				if (flag) { puts("Yes\n"); }
				else { puts("No\n"); }
			}
			else
			{ puts("Yes\n"); }
		}
	}
	return 0;
}

#include<stdio.h>

int main()
{
    int n,k;
    scanf("%d%d",&n,&k);
    int a[n],i;
    for(i=0;i<n;i++)
    scanf("%d",&a[i]);
    int b[k];
    for(i=0;i<k;i++)
    scanf("%d",&b[i]);

    if(k==1)
    {
    for(i=0;i<n;i++)
    if(a[i]==0)
    a[i]=b[0];

    int c=0;
    for(i=0;i<n-1;i++)
    {
    printf("%d ",a[i]);
    if(a[i+1]<a[i])
    c++;
    }

    if(c>0)
    printf("YES");
    else
    printf("NO");
    }
    else
    printf("YES");

    return 0;
}

#include<stdio.h>
main()
{
int n,k,m,a,b,c,d,e,f,g,i,j,count=0;
scanf("%d %d",&n,&k);
int x[n],y[k];
for(i=0;i<n;i++)
{
scanf("%d",&x[i]);
}
for(i=0;i<k;i++)
{
scanf("%d",&y[i]);
}
/*checking whether the first is not increasing*/
for(i=0;i<n-1;i++)
{
if(x[i]==0)
{
continue;
}
a=x[i+1];
if(x[i+1]==0)
{
    a=x[i+2];
}
if(x[i]>a)
{
printf("Yes");return 0;
}
}
for(i=0;i<n;i++)
{
if(x[i]==0)
{
count++;
}
}
if(count==1)
{
    for(i=0;i<n;i++)
    {
        if(x[i]==0&&i==n-1&&x[i-1]>y[0])
        {
            printf("Yes");return 0;
        }
    }

printf("No");return 0;
}
for(i=0;i<k-1;i++)
{
if(y[i]!=y[i+1])
{
printf("Yes");return 0;
}
if(i==k-2)
{
printf("No");return 0;
}
}

}

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

int main()
{
    long long int ch[400000]= {0},cp[400000];
    char kh[200000],arr[2000][200];
    long long  int a,b=0,c,d,e,i=0,j=0,k=0,l=0,tep,temp,m,n,x,y;
    double z,go;

    scanf("%lld%lld",&a,&b);
    j=k=l=0;
    j=b>1?1:0;
    for(i=0; i<a; i++)
    {
        scanf("%lld",&c);
        if(k>c && c!=0)
            j=1;
        if(c!=0)
            k=c;
    }
    printf(j==1?"YES\n":"NO\n");
    return 0;
}

#include <stdio.h>
int main()
{
	int n,m;
	int i,j;
	scanf("%d %d",&n,&m);
	int a[n],b[m],count=0,flag=0,prev,ans;
	for(i=0;i<n;i++)
	{
		scanf("%d",&a[i]);
		if(a[i]==0)
			count++;
	}
	for(i=0;i<m;i++)
		scanf("%d",&b[i]);
	prev=a[0];
	for(i=1;i<n;i++)
	{
		if(a[i]!=0&&a[i]<prev)
			flag=1;
		if(a[i]!=0)
			prev=a[i];
	}
	if(count==m&&count>1)
		ans=1;
	if(m<count)
		ans=0;
	if(count==1&&m==1)
	{
		for(i=0;i<n;i++)
		{
			if(a[i]==0)
				a[i]=b[0];
		}
		for(i=1;i<n;i++)
		{
			if(a[i]<a[i-1])
				ans=1;
		}
	}
	if(count==1&&flag==1)
		printf("Yes\n");
	else
		printf("No\n");
}

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

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

int main(){
  int len1, i, len2, pos = 0;
  scanf("%d%d", &len1, &len2);
  int w[len1], m[len2];
  for(i = 0; i < len1; i++){
    scanf("%d", &w[i]);
  }
  for(i = 0; i < len2; i++){
    scanf("%d", &m[i]);
  }
  qsort(m, len2, sizeof(int), cmp);
  for(i = 0; i < len1; i++){
    if(!w[i]){
      if(i != 0){
        if(w[i-1] > m[pos]){
          printf("Yes\n");
          return 0;
        }
      }
      if(i != len1-1){
        if(w[i+1] < m[pos]){
          printf("Yes\n");
          return 0;
        }
      }
      w[i] = m[pos];
      pos++;
    }
  }
  printf("No\n");
  return 0;
}

#include<stdio.h>

int main()
{
    int ara1[205],ara2[205];
    int i,j=0,kase1,kase2;

    scanf("%d%d",&kase1,&kase2);

    for(i=0;i<kase1;i++){
        scanf("%d",&ara1[i]);
    }

    for(i=0;i<kase2;i++){

        scanf("%d",&ara2[i]);
    }
    if(kase2>1){
        printf("Yes\n");
        return 0;
    }
    int c=0;
    for(i=0;i<kase2;i++){
        if(ara1[i]==0){
            c++;
        }
    }
    if(c==kase1){
        printf("Yes\n");
        return 0;
    }

    for(i=0;i<kase1;i++){
        if(ara1[i]==0){
            ara1[i]=ara2[j++];
        }
    }
    for(i=kase1-1;i>=0;i--){
        if(ara1[i]>ara1[i-1]){
            continue;
        }
        else break;
    }
    if(i==1) printf("No\n");
    else printf("Yes\n");
    return 0;
}

#include <stdio.h>
#include <ctype.h>

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

    char yes[4]  = "YES"; yes[3] = '\0';
    char no [3]  = "NO";  no[2]  = '\0';

    if(a == 1) {printf("%s", no); return 0;}
    if(a == b) {printf("%s", yes); return 0;}

    int arr_a[a]; int arr_b[b];

    for(int i = 0; i < a; i++)
    {
        scanf("%d", &arr_a[i]);
    }
    //printf("%s", no); return 0;
    for(int i = 0; i < b; i++)
    {
        scanf("%d", &arr_b[i]);
    }

    if(arr_a[0] == 0)
    {
        for(int j = 0; j < b; j++)
        {
            if(arr_a[1] < arr_b[j]){printf("%s", yes); return 0;}
        }
    }

    for(int i = 0; i < a; i++)
    {
        if((arr_a[i] != 0)&&(i < a - 1) &&(arr_a[i+1] != 0)){
            if(arr_a[i] > arr_a[i+1]) {printf("%s", yes); return 0;}
        }

        if((arr_a[i] == 0))
        {
            if((arr_a[i] == 0) && (i < a - 1))
            {
                if(arr_a[i + 1] == 0) {printf("%s", yes); return 0;}
                else
                {
                    for(int j = 0; j < b; j++)
                    {
                        if(arr_a[i-1] > arr_b[j] || arr_a[i+1] < arr_b[j]){printf("%s", yes); return 0;}
                    }
                    printf("%s", no); return 0;
                }
            }
            else
            {
                for(int j = 0; j < b; j++)
                {
                    if(arr_a[i-1] > arr_b[j]){printf("%s", yes); return 0;}
                }
                printf("%s", no); return 0;
            }
        }
    }
    printf("%s", no);
    return 0;

}

#include <stdio.h>
int main()
{
	int n,m;
	int i,j;
	scanf("%d %d",&n,&m);
	int a[n],b[m],count=0,flag=0,prev,ans;
	for(i=0;i<n;i++)
	{
		scanf("%d",&a[i]);
		if(a[i]==0)
			count++;
	}
	for(i=0;i<m;i++)
		scanf("%d",&b[i]);
	if(count==m&&count>1)
		ans=1;
	if(m!=count)
		ans=0;
	if(count==1&&m==1)
	{
		for(i=0;i<n;i++)
		{
			if(a[i]==0)
				a[i]=b[0];
		}
		for(i=1;i<n;i++)
		{
			if(a[i]<a[i-1])
				ans=1;
		}
	}
	if(ans==1)
		printf("Yes\n");
	else
		printf("No\n");
	return 0;
}

#include <stdio.h>

int a,b,Max,tmp=0;
int sa[100]={0,}, sb[100]={0,};
int sc[100]={0,};

void printc( void )
{
    for(int i=0;i<a-1;i++)
    {
        printf("%d", sc[i]);
    }

}

int main()
{
    scanf("%d%d", &a,&b);
    for(int i=0;i<a;i++) scanf("%d", &sa[i]);
    for(int i=0;i<b;i++) scanf("%d", &sb[i]);
    if(b!=1) { printf("yes"); return 0;}
    for(int i=0;i<a;i++)
    {
        if (sa[i]==0) tmp++; //0인 곳이 등장
        if(tmp!=0)
        {
            if(i==0) continue;
            sc[i]=sa[i+1];
        }
        else sc[i]=sa[i];
    }
   // printc();
    Max=sc[0];
   for(int i=0;i<a-1;i++)
   {
        if(Max<=sc[i]) Max=sc[i];
        else { printf("yes"); return 0;}
   }
    if(sa[a-1]==0 && Max<sb[1]) { printf("yes"); return 0;}
   printf("no");
    return 0;
}

#include<stdio.h>

int main()
{
    int ara1[205],ara2[205];
    int i,j=0,kase1,kase2;

    scanf("%d%d",&kase1,&kase2);

    for(i=0;i<kase1;i++){
        scanf("%d",&ara1[i]);
    }

    for(i=0;i<kase2;i++){

        scanf("%d",&ara2[i]);
    }
    if(kase2>1){
        printf("Yes\n");
        return 0;
    }
    int c=0;
    for(i=0;i<kase2;i++){
        if(ara1[i]==0){
            c++;
        }
    }
    if(c==kase1){
        printf("Yes\n");
        return 0;
    }

    for(i=0;i<kase1;i++){
        if(ara1[i]==0){
            ara1[i]=ara2[j++];
        }
    }
    int count=0;

    for(i=kase1-1;i>=0;i--){
        if(ara1[i]>ara1[i-1]){
            count++;
        }
    }
    if(count==(kase1)) printf("No\n");
    else printf("Yes\n");

    return 0;
}

#include<stdio.h>

int main()
{
    freopen("naz.txt","r",stdin);
    int ara1[205],ara2[205];
    int i,j=0,kase1,kase2;

    scanf("%d%d",&kase1,&kase2);

    for(i=0;i<kase1;i++){
        scanf("%d",&ara1[i]);
    }

    for(i=0;i<kase2;i++){
        scanf("%d",&ara2[i]);
    }
    int c=0;
    for(i=0;i<kase2;i++){
        if(ara1[i]==0){
            c++;
        }
    }
    if(c==kase1){
        printf("Yes\n");
        return 0;
    }

    for(i=0;i<kase1;i++){
        if(ara1[i]==0){
            ara1[i]=ara2[j++];
        }
    }
    int count=0;

    for(i=0;i<kase1;i++){
        if(ara1[i+1]>ara1[i]){
            count++;
        }
    }
    if(count==(kase1)) printf("No\n");
    else printf("Yes\n");

    return 0;
}

#include <stdio.h>

int a,b,Max,tmp=0;
int sa[100]={0,}, sb[100]={0,};
int sc[100]={0,};

int main()
{
    scanf("%d%d", &a,&b);
    for(int i=0;i<a;i++) scanf("%d", &sa[i]);
    for(int i=0;i<b;i++) scanf("%d", &sb[i]);
    if(b!=1) { printf("yes"); return 0;}
    for(int i=0;i<a;i++)
    {
        if (sa[i]==0) tmp++; //0인 곳이 등장
        if(tmp!=0)
        {
            if(i==0) continue;
            sc[i]=sa[i+1];
        }
        else sc[i]=sa[i];
    }
    Max=sc[0];
   for(int i=0;i<a-1;i++)
   {
        if(Max<=sc[i]) Max=sc[i];
        else { printf("yes"); return 0;}
   }
   printf("no");
    return 0;
}

#include<stdio.h>

int main()
{
    int ara1[205],ara2[205];
    int i,j=0,kase1,kase2;

    scanf("%d%d",&kase1,&kase2);

    for(i=0;i<kase1;i++){
        scanf("%d",&ara1[i]);
    }

    for(i=0;i<kase2;i++){

        scanf("%d",&ara2[i]);
    }
    if(kase2>1){
        printf("Yes\n");
        return 0;
    }
    int c=0;
    for(i=0;i<kase2;i++){
        if(ara1[i]==0){
            c++;
        }
    }
    if(c==kase1){
        printf("Yes\n");
        return 0;
    }

    for(i=0;i<kase1;i++){
        if(ara1[i]==0){
            ara1[i]=ara2[j++];
        }
    }
    for(i=kase1-1;i>=0;i--){
        if(ara1[i]>ara1[i-1]){
            continue;
        }
        else break;
    }
    if(i==0) printf("No\n");
    else printf("Yes\n");
    return 0;
}

#include<stdio.h>

main()
{
    //freopen("in.txt", "r", stdin);
    int n, m, n1, m1, num, c = 0, t, i;
    scanf("%d %d", &n, &m);
    int a[n], b[m];
    for(i = 0; i<n; i++)
        scanf("%d", &a[i]);

    for(i = 0; i<m; i++)
        scanf("%d", &b[i]);

    for(i = 0; i<n-1; i++)
    {
        if(a[i+1]==0)
            {i++; continue;}

        if(a[i]>a[i+1])
            {printf("Yes"); return 0;}
    }

    //if(i!=n-2)
    //{printf("YES"); return 0;}

    if(m==1)
    {
        for(i = 0; i<n; i++)
        {
            if(a[i]==0)
            break;
        }
        //printf("%d %d", b[0], a[i-1]);
        if(b[0]<a[i-1] || b[0]>a[i+1])
            printf("Yes");
        else
            printf("No");
    }

    else
    {
        for(i = 0; i<n; i++)
        {
            if(a[i]==0)
            break;
        }
        int max, min;
        max = b[0];
        min = b[0];
        for(i = 0; i<m; i++)
        {
            if(b[i]>=max)
                max = b[i];
            if(b[i]<=min)
                min = b[i];
        }

        if(max!=min)
            printf("Yes");
        else if(max==min && max<a[i-1])
            printf("Yes");
        else
            printf("No");

    }

}

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

int main()
{
    int n,m;
    scanf("%d %d",&n,&m);
    int big[n];
    int small[m];
    for(int i=0; i<n; i++)
    {
        scanf("%d",&big[i]);
    }
    for(int i=0; i<m; i++)
    {
        scanf("%d",&small[i]);
    }

int i, j;
for(i = 0; i < m; i++)
for(j = 0; j < m-1-i; j++)
if(small[j] > small[j+1])
{
    int temp=small[j];
    small[j]=small[j+1];
    small[j+1]=temp;
}

    int flag=0;
    for(int i=0,j=0;i<n&&j<m;i++)
    {
        if(big[i]==0)
        {
            if(small[j]<big[i-1])
            {
                flag=1;
                break;
            }
            else
            {
                big[i]=small[j];
                                j++;

            }
        }
    }
    if(flag==1)
        printf("YES");
    else
        printf("NO");

    return 0;
}

#include<stdio.h>

int main()

{
    int n,m,i,j,k=0,l=0;

    scanf("%d %d",&n,&m);

    int x[n],y[m];

    for(i=0;i<n;i++)
        scanf("%d",&x[i]);

    for(i=0;i<m;i++)
        scanf("%d",&y[i]);

        if(k>1) printf("Yes");
        else

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

                if(!x[i]) x[i]=y[0];

            for(i=1;i<n;i++)
            {
                if(x[i]<x[i-1]) break;
            }

            if(i==n) printf("No");

            else printf("Yes");

        }

}

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

int main()
{
    int ara1[205],ara2[205];
    int i,j=0,kase1,kase2;

    scanf("%d%d",&kase1,&kase2);

    for(i=0;i<kase1;i++){
        scanf("%d",&ara1[i]);
    }

    for(i=0;i<kase2;i++){

        scanf("%d",&ara2[i]);
    }
    int c=0;
    for(i=0;i<kase2;i++){
        if(ara1[i]==0){
            c++;
        }
    }
    if(c==kase1){
        printf("Yes\n");
        return 0;
    }

    for(i=0;i<kase1;i++){
        if(ara1[i]==0){
            ara1[i]=ara2[j++];
        }
    }
    int count=0;

    for(i=0;i<kase1;i++){
        if(ara1[i+1]>ara1[i]){
            count++;
        }
    }
    if(count==(kase1)) printf("No\n");
    else printf("Yes\n");

    return 0;
}

#include <stdio.h>
int main()
{
	int n,m;
	int i,j;
	scanf("%d %d",&n,&m);
	int a[n],b[m],count=0,flag=0,prev,ans;
	for(i=0;i<n;i++)
	{
		scanf("%d",&a[i]);
		if(a[i]==0)
			count++;
	}
	for(i=0;i<m;i++)
		scanf("%d",&b[i]);
	prev=a[0];
	for(i=1;i<n;i++)
	{
		if(a[i]!=0&&a[i]<prev)
			flag=1;
		if(a[i]!=0)
			prev=a[i];
	}
	if(count==m&&count>1)
		ans=1;
	if(m<count)
		ans=0;
	if(count==1&&m==1)
	{
		for(i=0;i<n;i++)
		{
			if(a[i]==0)
				a[i]=b[0];
		}
		for(i=1;i<n;i++)
		{
			if(a[i]<a[i-1])
				ans=1;
		}
	}
	if(ans==1)
		printf("Yes\n");
	else
		printf("No\n");
	return 0;
}

#include <stdio.h>
int main()
{
	int n,m;
	int i,j;
	scanf("%d %d",&n,&m);
	int a[n],b[m],count=0,flag=0,prev;
	for(i=0;i<n;i++)
	{
		scanf("%d",&a[i]);
		if(a[i]==0)
			count++;
	}
	for(i=0;i<m;i++)
		scanf("%d",&b[i]);
	prev=a[0];
	for(i=1;i<n;i++)
	{
		if(a[i]!=0&&a[i]<prev)
			flag=1;
		if(a[i]!=0)
			prev=a[i];
	}
	if(count==1&&flag==1)
		printf("Yes\n");
	else
		printf("No\n");
}

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

int main()
{
    int n,m;
    scanf("%d %d",&n,&m);
    int big[n];
    int small[m];
    int ff=0;
    for(int i=0; i<n; i++)
    {
        scanf("%d",&big[i]);
        if(big[i]!=0)
            for(int j=i; j>=0; j--)
            {
                if(big[j]!=0)
                {
                    if(big[i]<big[j])
                    {
                        ff=1;
                        break;
                    }
                }
            }
    }
    for(int i=0; i<m; i++)
    {
        scanf("%d",&small[i]);
    }
    if(ff==1)
    {
        printf("YES");
        return 0;
    }

    int i, j;
    for(i = 0; i < m; i++)
        for(j = 0; j < m-1-i; j++)
            if(small[j] > small[j+1])
            {
                int temp=small[j];
                small[j]=small[j+1];
                small[j+1]=temp;
            }

    int flag=0;
    for(int i=0,j=0; i<n&&j<m; i++)
    {
        if(big[i]==0)
        {
            if(small[j]<big[i-1])
            {
                flag=1;
                break;
            }
            else
            {
                big[i]=small[j];
                j++;

            }
        }
    }
    if(flag==1)
        printf("YES");
    else
        printf("NO");

    return 0;
}

#include<stdio.h>
#define N 102
int main(){
    int a[N];
    int b[N];
    int n,k;
    scanf("%d%d",&n,&k);
    int i;
    for(i=0;i<n;i++){
        scanf("%d",&a[i]);
    }
    for(i=0;i<k;i++){
        scanf("%d",&b[i]);
    }
    int tmp=a[0];
    int increase=1;
    for(i=1;i<n;i++){
        if(a[i]!=0){
           if(tmp<=a[i]){
            tmp=a[i];
           }else{
               increase=0;
               break;
           }
        }
    }
    int max=b[0];
    int min=b[0];
    for(i=1;i<k;i++){
        if(max<b[i])max=b[i];
        if(min>b[i])min=b[i];
    }
    if(k!=1){
        if(max!=min){
            increase=0;
        }
    }
    if(increase)
        printf("NO\n");
    else
        printf("YES\n");

    return 0;
}

#include<stdio.h>

int main()
{

    int ara1[205],ara2[205];
    int i,j=0,kase1,kase2;

    scanf("%d%d",&kase1,&kase2);

    for(i=0;i<kase1;i++){
        scanf("%d",&ara1[i]);
    }

    for(i=0;i<kase2;i++){

        scanf("%d",&ara2[i]);
    }
    int c=0;
    for(i=0;i<kase2;i++){
        if(ara1[i]==0){
            c++;
        }
    }
    if(c==kase1){
        printf("Yes\n");
        return 0;
    }

    for(i=0;i<kase1;i++){
        if(ara1[i]==0){
            ara1[i]=ara2[j++];
        }
    }
    int count=0;

    for(i=0;i<kase1;i++){
        if(ara1[i+1]>ara1[i]){
            count++;
        }
    }
    if(count==(kase1-1)) printf("No\n");
    else printf("Yes\n");

    return 0;
}

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

int main()
{
    int n,m;
    scanf("%d %d",&n,&m);
    int big[n];
    int small[m];
    int ff=0;
    for(int i=0; i<n; i++)
    {
        scanf("%d",&big[i]);
        if(big[i]!=0)
        for(int j=i;j>=0;j--)
        {
            if(big[j]!=0)
            {
                if(big[i]<big[j])
                {
                   ff=1;
                    break;
                }
            }
        }
    }
    for(int i=0; i<m; i++)
    {
        scanf("%d",&small[i]);
    }
if(ff==1)
{
    printf("YES");
    return 0;
}

int i, j;
for(i = 0; i < m; i++)
for(j = 0; j < m-1-i; j++)
if(small[j] > small[j+1])
{
    int temp=small[j];
    small[j]=small[j+1];
    small[j+1]=temp;
}

    int flag=0;
    for(int i=0,j=0;i<n&&j<m;i++)
    {
        if(big[i]==0)
        {
            if(small[j]<big[i-1])
            {
                flag=1;
                break;
            }
            else
            {
                big[i]=small[j];
                                j++;

            }
        }
    }
    if(flag==1)
        printf("YES");
    else
        printf("NO");

    return 0;
}

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

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

int main()
{
    int n, k;
    int i;
    scanf("%d %d", &n, &k);
    int a[n], b[k];
    for(i=0; i<n; i++)
        scanf("%d", &a[i]);
    for(i=0; i<k; i++)
        scanf("%d", &b[i]);
    for(i=0; i<n-1; i++)
    {
        if((a[i] > a[i+1]) && a[i+1] != 0)
        {
            printf("Yes");
            return 0;
        }
    }
    qsort(b, k, sizeof(int), cmpfunc);
    for(i=0; i<n-1; i++)
    {
        if((a[i] == 0) && b[0] > a[i+1])
        {
            printf("Yes");
            return 0;
        }
    }
    printf("No");
    return 0;
}

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

int main()
{
    int n,m;
    scanf("%d %d",&n,&m);
    int big[n];
    int small[m];
    for(int i=0; i<n; i++)
    {
        scanf("%d",&big[i]);
    }
    for(int i=0; i<m; i++)
    {
        scanf("%d",&small[i]);
    }

int i, j;
for(i = 0; i < m; i++)
for(j = 0; j < m-1-i; j++)
if(small[j] > small[j+1])
{
    int temp=small[j];
    small[j]=small[j+1];
    small[j+1]=temp;
}

    int flag=0;
    for(int i=0,j=0;i<n&&j<m;i++)
    {
        printf("%d %d aa",big[i],small[j]);
        if(big[i]==0)
        {
            if(small[j]<big[i-1])
            {
                flag=1;
                break;
            }
            else
            {
                big[i]=small[j];
                                j++;

            }
        }
    }
    if(flag==1)
        printf("YES");
    else
        printf("NO");

    return 0;
}

#include<stdio.h>
#include<stdlib.h>
int cmpfnc(const void *a,const void *b){
    if(*(int *)a==*(int *)b) return 0; else return *(int *)b-*(int *)a;
}
int main(){
    int n,k;scanf(" %d%d",&n,&k);
    int i,j=0,jk,a[n],b[k],min=0;
    for(i=0;i<n;i++){scanf(" %d",&a[i]);if(a[i]<=min){j++;}min=a[i];if(a[i]==0)jk=i;}
    for(i=0;i<k;i++)scanf(" %d",&b[i]);
    //qsort(b,k,sizeof(b[0]),cmpfnc);
    j-=k;
    if(k==1){
        if(jk==n-1) (a[jk-1]>=b[0]) ? printf("Yes"):puts("No");
    else if(jk==0) (a[jk+1]<=b[0]) ? printf("Yes"):puts("No");
    else (j>0 || a[jk+1]<=b[0]) ? printf("Yes"):puts("No");
    }
    else puts("Yes");
    return 0;
}

#include<stdio.h>

int main(){

	int n ,k ,i ,c=0;
	scanf("%d%d",&n ,&k);
	int a[n] ,b[k];
	for(i=0;i<n;i++) scanf("%d",&a[i]);
	for(i=0;i<k;i++) scanf("%d",&b[i]);
	if(k>1) printf("Yes\n");
	else{
		for(i=0;i<n;i++){
			if(a[i]==0){
				a[i]=b[0];
				break;
			}
		}
		for(i=0;i<n-1;i++){
			if(a[n-1]>a[i]) c++;
		}
		if(c==n-1) printf("NO");
		else printf("YES");
	}

	return 0;
}

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

int main()
{
    int n, k;

    scanf("%d %d", &n, &k);
    int i, j = 0;

    int a[n], b[k];

    for(i = 0; i < n; i++)
    {
        scanf("%d", &a[i]);
    }
    for(i = 0; i < k; i++)
    {
        scanf("%d", &b[i]);
    }
    if(k != 1)
    {
        printf("Yes");
        return 0;
    }
    for(i = 0; i < n-1; i++)
    {
        if(a[i+1] == 0)
        {
            a[i+1] = b[0];
        }
        if(a[i] > a[i+1])
        {
            printf("Yes");
            return 0;
        }
    }
    printf("No");
    return 0;
}

#include<stdio.h>

int main ()
{
	int a,b,c,x,y,z,l,m,n,k;
	int input1[1000],input2[1000];
	int sum = 0 , index ;
	int flag1 =0 , flag2 =0 ;

	scanf ("%d %d",&n,&k);

	for (a=0 ; a<n ;a++)
	{
		scanf ("%d",&input1[a]);
	}

	for (b=0 ; b<k ; b++)
	{
		scanf ("%d",&input2[b]);
	}

	for (a=0 ; a<n ;a++)
	{
		if (input1[a] == 0)
		{
			sum = sum + 1 ;
			index = a ;
		}
	}

	if ( sum > 1)
	{
		printf ("Yes\n");
	}

	else if (sum ==1)
	{
		for (x=0 ; x<index ;x++)
		{
			if (input1[x] > input2[0])
			{
				flag1 = -1 ;
				break ;
			}
		}

		for (x=index+1 ; x<n ;x++)
		{
			if (input1[x] < input2[0])
			{
				flag2 = -1 ;
				break ;
			}
		}

		if ((flag1 == 0)&& (flag2 == 0))
		{
			printf ("No\n");
		}
		else
			printf ("Yes\n");
	}

return 0 ;
}

#include <stdio.h>

int a,b,Max,tmp=0;
int sa[100]={0,}, sb[100]={0,};
int sc[100]={0,};

void printc( void )
{
    for(int i=0;i<a-1;i++)
    {
        printf("%d", sc[i]);
    }

}

int main()
{
    scanf("%d%d", &a,&b);
    for(int i=0;i<a;i++) scanf("%d", &sa[i]);
    for(int i=0;i<b;i++) scanf("%d", &sb[i]);
    if(b!=1) { printf("yes"); return 0;}
    for(int i=0;i<a;i++)
    {
        if (sa[i]==0) tmp++; //0인 곳이 등장
        if(tmp!=0)
        {
            if(i==0) continue;
            sc[i]=sa[i+1];
        }
        else sc[i]=sa[i];
    }
   // printc();
    Max=sc[0];
   for(int i=0;i<a-1;i++)
   {
        if(Max<=sc[i]) Max=sc[i];
        else { printf("yes"); return 0;}
   }
    if(sa[a-1]==0 && Max>sb[1]) { printf("yes"); return 0;}
   printf("no");
    return 0;
}

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

int main()
{
    int i, j,n, k, sortflag = 0;
    scanf("%d %d", &n, &k);
    int a[n], b[k], c[n];
    for(i = 0; i < n; ++i)
        scanf("%d", &a[i]);

    for(i = 0; i < k; ++i)
        scanf("%d", &b[i]);

    for(i = 0; i < k - 1; ++i) {
        for(j = i + 1; j < k; ++j) {
            if(b[i] < b[j]) {
                b[i] = b[i] ^ b[j];
                b[j] = b[i] ^ b[j];
                b[i] = b[i] ^ b[j];
            }
        }
    }
    j = 0;
    for(i = 0; i < n; ++i) {
        if(a[i] != 0) c[i] = a[i];
        else {
                c[i] = b[j], j++;
        }
    }
    for(i = 0; i < n - 1; ++i) {
        if(c[i] > c[i + 1]) {
            sortflag = 1;
            break;
        }
    }
    for(i = 0; i < n; ++i) printf("%d ", c[i]);
    if(sortflag == 0) printf("No");
    else printf("Yes");

    return 0;
}

#include<stdio.h>

int main()
{
    int ara1[205],ara2[205];
    int i,j=0,kase1,kase2;

    scanf("%d%d",&kase1,&kase2);

    for(i=0;i<kase1;i++){
        scanf("%d",&ara1[i]);
    }

    for(i=0;i<kase2;i++){

        scanf("%d",&ara2[i]);
    }
    if(kase2>1){
        printf("Yes\n");
        return 0;
    }
    int c=0;
    for(i=0;i<kase2;i++){
        if(ara1[i]==0){
            c++;
        }
    }
    if(c==kase1){
        printf("Yes\n");
        return 0;
    }

    for(i=0;i<kase1;i++){
        if(ara1[i]==0){
            ara1[i]=ara2[j++];
        }
    }
    int count=0;

    for(i=0;i<kase1;i++){
        if(ara1[i+1]>ara1[i]){
            count++;
        }
    }
    if(count==(kase1-1)) printf("No\n");
    else printf("Yes\n");

    return 0;
}

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

int main()
{
    int n,m;
    scanf("%d %d",&n,&m);
    if(m>1)
    {
        int temp;
        for(int i=0; i<n; i++)
            scanf("%d",&temp);
        for(int i=0; i<m; i++)
            scanf("%d",&temp);
        printf("YES");
    }
    else
    {
        int arr[n],k,flag=0;
        for(int i=0; i<n; i++)
        {
            scanf("%d",&arr[i]);
            if(arr[i]==0)
                k=i;
            else
            {
                if(i!=0&&arr[i]<arr[i-1])
                    flag=1;
            }
        }
        int temp;
        scanf("%d",&temp);
        if(flag==1)
            printf("YES");
        if(k!=0)
        {
            if(temp>=arr[k-1])
                printf("NO");
            else
                printf("YES");
        }
        else
        {
            if(temp<=arr[k+1])
                printf("NO");
            else
                printf("YES");
        }
    }
    return 0;
}

#include<stdio.h>
int main()
{
    int n,k,flag=0;
    scanf("%d %d",&n,&k);
    int a[n],b[k];
    for(int i=0;i<n;i++)
     scanf("%d ",&a[i]);
     for(int i=0;i<k;i++)
     scanf("%d ",&b[i]);
     if(k>1)
     printf("Yes");
     if(a[0]==0)
       a[0]=b[0];
     else
       {
         for(int i=0;i<n-1;i++)
            {
                    if(a[i+1]==0)
                       a[i+1]=b[0];
                    if(a[i+1]<a[i])
                      {flag=1;break;}
            }
        if(flag==0)
          printf("No");
        else printf("Yes");
       }
       return 0;

}

#include<stdio.h>
int main()
{
    int n,k,flag=0;
    scanf("%d %d",&n,&k);
    int a[n],b[k];
    for(int i=0;i<n;i++)
     scanf("%d ",&a[i]);
     for(int i=0;i<k;i++)
     scanf("%d ",&b[i]);
     if(k>1)
     printf("Yes");
     else
       {
         for(int i=0;i<n-1;i++)
            {
                    if(a[i]==0)
                       a[i]=b[0];
                    if(a[i+1]<a[i])
                      {flag=1;break;}
            }
        if(flag==0)
          printf("No");
        else printf("Yes");
       }
       return 0;

}

#include <stdio.h>

int main()

{

    int n , k ;

    scanf("%d %d",&n,&k) ;

    int ara[n] , bra[k] ;

    for( int x = 0 ; x < n ; x++ )  scanf("%d",&ara[x]) ;

    for( int y = 0 ; y < k ; y++ )  scanf("%d",&bra[y]) ;

    int key ;

    if( k == 1 )  {

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

            if( ara[a] == 0 )  {

                key = a ;

                break ;

            }

        }

        if( ( ara[key-1] < bra[0] )  && ( bra[0] < ara[key+1] ) )  {

            printf("No\n") ;

            return 0 ;

        }

        else  {

            printf("Yes\n") ;

            return 0 ;

        }

    }

    printf("Yes\n") ;

    return 0 ;

}

#include<stdio.h>
#include<stdlib.h>
#include<math.h>
#include<string.h>
#include <ctype.h>
int cmp(const void *a, const void *b){
	return *(int*)b-*(int*)a;

}
int main(){
int i,n,k,first,flag=0;
scanf("%d %d",&n,&k);
int t[n],tab[k];

for(i=0;i<n;i++)
{scanf("%d",&t[i]);
if(t[i]==0&&flag==0){
   first=i;
   flag=1;
}

}

for(i=0;i<k;i++){
	scanf("%d",&tab[i]);

}
qsort(tab,k,sizeof(*tab),cmp);

int h=0;
for(i=first;i<first+k;i++){
	t[i]=tab[h];
	h++;

}
int total=0;
for(i=0;i<n;i++){
	if(t[i]<t[i+1])
	total+=1;

}

if(total==n)
printf("No");
else printf("Yes");

	return 0;

}

#include<stdio.h>

int main()
{
    int ara1[205],ara2[205];
    int i,j=0,kase1,kase2;

    scanf("%d%d",&kase1,&kase2);

    for(i=0;i<kase1;i++){
        scanf("%d",&ara1[i]);
    }

    for(i=0;i<kase2;i++){

        scanf("%d",&ara2[i]);
    }
    if(kase2>1){
        printf("Yes\n");
    }
    int c=0;
    for(i=0;i<kase2;i++){
        if(ara1[i]==0){
            c++;
        }
    }
    if(c==kase1){
        printf("Yes\n");
        return 0;
    }

    for(i=0;i<kase1;i++){
        if(ara1[i]==0){
            ara1[i]=ara2[j++];
        }
    }
    int count=0;

    for(i=0;i<kase1;i++){
        if(ara1[i+1]>ara1[i]){
            count++;
        }
    }
    if(count==(kase1-1)) printf("No\n");
    else printf("Yes\n");

    return 0;
}