Not so long ago company R2 bought company R1 and consequently, all its developments in the field of multicore processors. Now the R2 laboratory is testing one of the R1 processors.

The testing goes in n steps, at each step the processor gets some instructions, and then its temperature is measured. The head engineer in R2 is keeping a report record on the work of the processor: he writes down the minimum and the maximum measured temperature in his notebook. His assistant had to write down all temperatures into his notebook, but (for unknown reasons) he recorded only m.

The next day, the engineer's assistant filed in a report with all the m temperatures. However, the chief engineer doubts that the assistant wrote down everything correctly (naturally, the chief engineer doesn't doubt his notes). So he asked you to help him. Given numbers n, m, min, max and the list of m temperatures determine whether you can upgrade the set of m temperatures to the set of n temperatures (that is add n - m temperatures), so that the minimum temperature was min and the maximum one was max.


-----Input-----

The first line contains four integers n, m, min, max (1 ≤ m < n ≤ 100; 1 ≤ min < max ≤ 100). The second line contains m space-separated integers t_{i} (1 ≤ t_{i} ≤ 100) — the temperatures reported by the assistant.

Note, that the reported temperatures, and the temperatures you want to add can contain equal temperatures.


-----Output-----

If the data is consistent, print 'Correct' (without the quotes). Otherwise, print 'Incorrect' (without the quotes).


-----Examples-----
Input
2 1 1 2
1

Output
Correct

Input
3 1 1 3
2

Output
Correct

Input
2 1 1 3
2

Output
Incorrect



-----Note-----

In the first test sample one of the possible initial configurations of temperatures is [1, 2].

In the second test sample one of the possible initial configurations of temperatures is [2, 1, 3].

In the third test sample it is impossible to add one temperature to obtain the minimum equal to 1 and the maximum equal to 3.

Difficulty: interview

Starter code:

Solutions:
def main():
	n, m, mn, mx = map(int, input().split())
	A = list(map(int, input().split()))
	a = min(A)
	b = max(A)
	if a < mn or b > mx:
		print("Incorrect")
		return
	cnt = 0
	if a > mn:
		cnt += 1
	if b < mx:
		cnt += 1
	if m + cnt <= n:
		print("Correct")
	else:
		print("Incorrect")

main()

[n, m, min_t, max_t], t = list(map(int, input().split())), list(map(int, input().split()))
min_m, max_m = min(t), max(t)
if min_m >= min_t and max_m <= max_t and (n - m) >= ((min_m != min_t) + (max_m != max_t)):
    print('Correct')
else:
    print('Incorrect')


n, m, min_, max_ = list(map(int, input().split()))
l = sorted(list(map(int, input().split())))
if l[0]  < min_ or l[-1] > max_:
    print("Incorrect")
else:
    if l[-1] < max_:
        l.append(max_)
    if l[0] > min_:
        l.append(min_)
    if len(l) <= n:
        print("Correct")
    else:
        print("Incorrect")



n, m, mi, ma = map(int, input().split())
t = list(map(int, input().split()))
mit = min(t)
mat = max(t)
if (mi <= mit and ma >= mat) and (n - m  >= 2 or (n - m >= 1 and (mit == mi or mat == ma)) or (mit == mi and mat == ma)):
    print('Correct')
else:
    print('Incorrect')

n, m, mmin, mmax = map(int, input().split())
s = list(map(int, input().split()))
s = sorted(s)
if s[0] < mmin or s[m - 1] > mmax:
    print("Incorrect")
elif s[0] == mmin and s[m - 1] == mmax:
    print("Correct")
elif s[0] != mmin and s[m - 1] != mmax:
    if n - m < 2:
        print("Incorrect")
    else:
        print("Correct")
elif s[0] != mmin or s[m - 1] != mmax:
    if n - m < 1:
        print("Incorrect")
    else:
        print("Correct")

n, _, small, big =  list(map(int, input().split()))
m = list(map(int, input().split()))

diff = n - _

rd = 0

if (max(m) != big):
    rd += 1
if (min(m) != small):
    rd += 1

if min(m) < small or max(m) > big:
    print('Incorrect')
    return

#print('diff', diff)
#print('rd', rd)
#n - vsego
# m zapisal pomosh

if rd <= diff:
    print('Correct')
else:
    print('Incorrect')


n, m, mi, ma = map(int, input().split())
a = sorted(list(map(int, input().split())))
if n - m >= 2:
    if a[0] >= mi and a[-1] <= ma:
        print('Correct')
    else:
        print('Incorrect')
elif n - m == 1:
    if (a[0] >= mi and a[-1] == ma) or (a[0] == mi and a[-1] <= ma):
        print('Correct')
    else:
        print('Incorrect')
else:
    if a[0] == mi and a[-1] == ma:
        print('Correct')
    else:
        print('Incorrect')

x = 0
res = 0
n, m, mn, mx = list(map(int, input().split()))
lst = list(map(int, input().split()))
for i in range(m):
    if lst[i] < mn or lst[i] > mx:
        res = "Incorrect"
        break
    if lst[i] == mn:
        x = 1
    elif lst[i] == mx:
        x = 1
if res == "Incorrect":
    print(res)
else:
    if n - m >= 2 - x:
        print("Correct")
    else:
        print("Incorrect")


n,m,minn,maxx=list(map(int,input().split()))

L=list(map(int,input().split()))

r=0
if(minn not in L):
    L+=[minn]
    r+=1
if(maxx not in L):
    L+=[maxx]
    r+=1
valid=True

for i in range(m):
    if(L[i]<minn):
        valid=False
    if(L[i]>maxx):
        valid=False
if(r>n-m or not valid):
    print("Incorrect")
else:
    print("Correct")


n, m , minimum, maximum = list(map(int, input().split()))
list_of_m = list(map(int, input().split()))

maxi =  max(list_of_m)
mini =  min(list_of_m)

if maxi < maximum and mini > minimum :
    if n - m >= 2:
        print("Correct")
    else:
        print("Incorrect")
elif maxi == maximum and mini > minimum :
    if n - m >= 1:
        print("Correct")
    else:
        print("Incorrect")
elif maxi < maximum and mini == minimum :
    if n - m >= 1:
        print("Correct")
    else:
        print("Incorrect")
elif maxi == maximum and mini == minimum :
    print("Correct")
else:
    print("Incorrect")


n, k, s, b =  list(map(int, input().split()))
m = list(map(int, input().split()))
print(('Inc' if min(m)<s or max(m)>b or (max(m)!=b)+(min(m)!=s)>n-k else 'C') + 'orrect')


n, m, mi, ma = tuple(map(int, str.split(input())))
ts = tuple(map(int, str.split(input())))
if max(ts) > ma or min(ts) < mi:

    ans = "Incorrect"

else:

    count = 2
    if mi in ts:

        count -= 1

    if ma in ts:

        count -= 1

    if n - m >= count:

        ans = "Correct"

    else:

        ans = "Incorrect"

print(ans)


n, m, minn, maxx = map(int, input().split())
a = sorted(list(map(int, input().split())))
cnt = 0
if minn != a[0]:
    cnt += 1
if maxx != a[-1]:
    cnt += 1
if maxx < a[-1]:
    cnt += 10000000000000000000
if minn > a[0]:
    cnt += 10000000000000000000
if n - m >= cnt:
    print("Correct")
else:
    print("Incorrect")

n, m, a, b = map(int, input().split())
t = list(map(int, input().split()))
x, y = min(t), max(t)
print('Correct' if a <= x and y <= b and len(t) + int(a < x) + int(y < b) <= n else 'Incorrect')

n, m, Min, Max = map(int, input().split())
a = list(map(int, input().split()))
remain = n - m
cnt = 0
flag = 0
for i in a:
    if i == Min or i == Max:
        cnt += 1
    if i < Min or i > Max:
        flag = -1
cnt = 2 - cnt
if flag == -1:
    print("Incorrect")
else:
    if n - m >= cnt:
        print("Correct")
    else:
        print("Incorrect")

(n, m, mi, mx) = map(int, input().split())
a = list(map(int, input().split()))
a.sort()
if a[0]!=mi:
    m += 1
if a[-1]!=mx:
    m += 1
if a[0]<mi:
    m += n+1
if a[-1]>mx:
    m += n+1
print(['Incorrect', 'Correct'][m<=n])

R = lambda:map(int, input().split())
n, m, a, b = R()
t = list(R())
print("Incorrect" if n - m == 1 and min(t) != a and max(t) != b or min(t) < a or max(t) > b else "Correct")

n, m, Min, Max = map(int, input().split())
t = list(map(int, input().split()))

if min(t) >= Min and max(t) <= Max:
    if m + abs(len({Min,Max} & set(t))-2) <= n:
        print('Correct')
    else:
        print('Incorrect')
else:
    print('Incorrect')

n, m, Min, Max = map(int, input().split())
a = list(map(int, input().split()))
remain = n - m
cnt = 0
flag = 0
for i in a:
    if i == Min or i == Max:
        cnt += 1
    if i < Min or i > Max:
        flag = -1
cnt = 2 - cnt
if flag == -1:
    print("Incorrect")
elif n - m >= cnt:
    print("Correct")
else:
    print("Incorrect")

import sys
from itertools import *
from math import *
MAX = 10000000
def solve():
    n, m, ss, ll = list(map(int, input().split()))
    a = set(map(int, input().split()))
    wantothers = 0
    smallest = 100000000
    largest = -1
    for val in a:
        smallest = min(smallest, val)
        largest = max(largest, val)
    if smallest < ss or largest > ll:
        print("Incorrect")
        return
    if ss not in a: wantothers+=1
    if ll not in a: wantothers+=1
    print("Correct" if wantothers <= n - m else "Incorrect")

if sys.hexversion == 50594544 : sys.stdin = open("test.txt")
solve()


n, m, v1, v2 = list(map(int, input().split()))
t = list(map(int, input().split()))
t1, t2 = min(t), max(t)
if t1 < v1 or t2 > v2:
    print('Incorrect')
elif (v1 < t1) + (v2 > t2) > n - m:
    print('Incorrect')
else:
    print('Correct')


I=lambda:list(map(int,input().split()))
n,m,N,X=I()
t=I()
r=min(t)!=N
r+=max(t)!=X
print(['C','Inc'][m+r>n or min(t)<N or max(t)>X]+'orrect')

n,m,mn,mx = input().split()
n,m,mn,mx = int(n),int(m),int(mn),int(mx)
diff = n-m
tem = [int(x) for x in input().split()]
flag = 0
check = 0
for x in tem:
    if x == mn or x == mx:
        flag = 1
    if x<mn or x>mx:
        check = 1
    
#print(flag,diff)
if not check:
    if diff >= 2:
        print("Correct")
    elif diff == 1 and flag:
        print("Correct")
    else:
        print("Incorrect")
else:
    print("Incorrect")

n, m, mn, mx = list(map(int, input().split()))
temps = list(map(int, input().split()))
mnt = min(temps)
mxt = max(temps)
if mnt < mn or mxt > mx:
    print('Incorrect')
    return
if n - m > 1:
    print('Correct')
    return
mnp = mn in temps
mxp = mx in temps
if n - m == 1 and (mnp or mxp):
    print('Correct')
elif mnp and mxp:
    print('Correct')
else:
    print('Incorrect')


import re
import inspect
from sys import argv, exit

def rstr():
    return input()

def rstrs(splitchar=' '):
    return [i for i in input().split(splitchar)]

def rint():
    return int(input())

def rints(splitchar=' '):
    return [int(i) for i in rstrs(splitchar)]

def varnames(obj, namespace=globals()):
    return [name for name in namespace if namespace[name] is obj]

def pvar(var, override=False):
    prnt(varnames(var), var)

def prnt(*args, override=False):
    if '-v' in argv or override:
        print(*args)

# Faster IO
pq = []
def penq(s):
    if not isinstance(s, str):
        s = str(s)
    pq.append(s)

def pdump():
    s = ('\n'.join(pq)).encode()
    os.write(1, s)

def __starting_point():
    timesteps, ast, mn, mx = rints()
    to_add = timesteps - ast
    asts = rints()
    for t in asts:
        if t < mn or t > mx:
            print('Incorrect')
            return
    if mn not in asts:
        if to_add == 0:
            print('Incorrect')
            return
        else:
            to_add -= 1

    if mx not in asts:
        if to_add == 0:
            print('Incorrect')
            return
        else:
            to_add -= 1

    print('Correct')

        

__starting_point()