Harryxun/stf_run huggingface dataset:
import sys
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))

N, K = MAP()
S = input()

def searchRL(S):
    ans = -1
    for i in range(N-1):
        if S[i] == "R" and S[i+1] == "L":
            return i

def searchLR(S):
    ans = -1
    for i in range(N-2,-1,-1):
        if S[i] == "L" and S[i+1] == "R":
            return i

def reverse(S):
    S = list(S)
    for i in range(len(S)):
        if S[i] == 'L':
            S[i] = 'R'
        if S[i] == 'R':
            S[i] = 'L'
    return ''.join(S)


def solve(S):
    RL = searchRL(S)
    LR = searchLR(S)
    if RL == -1 and LR == -1:
        return S, 0
    if RL == -1:
        S = reverse(S[LR::-1]) + S[LR+1:]
        return S, 1
    if LR == -1:
        S = reverse(S[RL::-1]) + S[RL+1:]
        return S, 1
    fir = min(LR, RL)
    sec = max(LR, RL)
    S = S[:fir+1] + reverse(S[sec:fir:-1]) + S[sec+1:]
    return S, 2

def cal(S):
    ans = 0
    for i in range(len(S)-1):
        if S[i] == S[i+1]:
            ans +=1
    return ans


ans = cal(S)
for i in range(K):
    S, res = solve(S)
    ans += res
print(ans)


### FIXED CODE ###

import sys
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))

N, K = MAP()
S = input()

def searchRL(S):
    ans = []
    for i in range(N-1):
        if S[i] == "R" and S[i+1] == "L":
            ans.append(i)
    return ans

def searchLR(S):
    ans = []
    for i in range(N-1):
        if S[i] == "L" and S[i+1] == "R":
            ans.append(i)
    return ans

def reverse(S):
    S = list(S)
    for i in range(len(S)):
        if S[i] == 'L':
            S[i] = 'R'
        if S[i] == 'R':
            S[i] = 'L'
    return ''.join(S)


def solve(S):
    if len(RL) == 0 and len(LR) == 0:
        return S, 0
    if len(RL) == 0:
        S = reverse(S[LR[0]::-1]) + S[LR[0]+1:]
        LR.pop(0)
        return S, 1
    if len(LR) == 0:
        S = reverse(S[RL[0]::-1]) + S[RL[0]+1:]
        RL.pop(0)
        return S, 1
    fir = min(LR[0], RL[0])
    sec = max(LR[0], RL[0])
    S = S[:fir+1] + reverse(S[sec:fir:-1]) + S[sec+1:]
    LR.pop(0)
    RL.pop(0)
    return S, 2

def cal(S):
    ans = 0
    for i in range(len(S)-1):
        if S[i] == S[i+1]:
            ans +=1
    return ans

RL = searchRL(S)
LR = searchLR(S)
ans = cal(S)
for i in range(K):
    S, res = solve(S)
    ans += res
print(ans)
N,M=map(int,input().split())
SC=[]
for i in range(M):
    SC.append(list(map(int,input().split())))

import numpy as np
SC=np.array(SC)


keta=np.unique(SC[:,0])
flag=0
for i in keta:
    if len(np.unique(SC[SC[:,0]==i]))>=3:
        flag=1
for x in SC[SC[:,0]==1]:
    if x[1]==0:
        flag=1

ans=[0]*N
ans[0]=1
if flag!=1:
    for i in keta:
        ans[i-1]=np.unique(SC[SC[:,0]==i])[1]
    ans2=""
    for a in ans:
        ans2+=str(a)
    print(ans2)
else:
    print(-1)

### FIXED CODE ###

N,M=map(int,input().split())
ans=[0]*N
SC=[0]*N
flag=0
flag2=0
for i in range(M):
    s,c=map(int,input().split())
    if s-1==0:
        flag2=1
    if SC[s-1]==1:
        if ans[s-1]!=c:
            flag=1
    else:
        SC[s-1]=1
        ans[s-1]=c

if flag2==0 and N!=1:
    ans[0]=1

if ans[0]==0 and N!=1:
    flag=1

if flag==0:
    ans2=""
    for a in ans:
        ans2+=str(a)
    print(ans2)
else:
    print(-1)
N, M , X = list(map(int,input().split()))

c = [[]]*N
a = [[[]]*M]*N

for n in range(N):
    temp = list(map(int,input().split()))
    c[n] = temp[0]
    a[n] = temp[1:N+1]


ans = 10**7

for i in range(2 ** N):
    price = 0
    intelligence = [0 for _ in range(M)]
    for j in range(N):
        if ((i >> j) & 1):
            price += c[j]
            for k in range(M):
                intelligence[k] += a[j][k]
    flag = 1
    for k in range(M):
        if intelligence[k] < X:
            flag = 0
    if flag == 1:
        ans = min(ans,price)

if ans == 10**7:
    print(-1)
else:
    print(ans)


### FIXED CODE ###

N, M , X = list(map(int,input().split()))

c = [[]]*N
a = [[[]]*M]*N

for n in range(N):
    temp = list(map(int,input().split()))
    c[n] = temp[0]
    a[n] = temp[1:M+1]


ans = 10**7

for i in range(2 ** N):
    price = 0
    intelligence = [0 for _ in range(M)]
    for j in range(N):
        if ((i >> j) & 1):
            price += c[j]
            for k in range(M):
                intelligence[k] += a[j][k]
    flag = 1
    for k in range(M):
        if intelligence[k] < X:
            flag = 0
    if flag == 1:
        ans = min(ans,price)

if ans == 10**7:
    print(-1)
else:
    print(ans)
import math

def lcm(x,y):
    return (x * y) // math.gcd(x,y)

A, B = map(int, input().split())

print(lcm(A,B))


### FIXED CODE ###

import fractions

def lcm(x,y):
    return (x * y) // fractions.gcd(x,y)

A, B = map(int, input().split())

print(lcm(A,B))
num = input().split(" ")
if num[0]*num[1] % 2 == 0:
  print("Even")
else:
  print("Odd")

### FIXED CODE ###

num = input().split(" ")
if int(num[0])*int(num[1]) % 2 == 0:
  print("Even")
else:
  print("Odd")
import sys
import bisect
import math
input = sys.stdin.readline

n = int(input())
l = [list(map(int, input().split())) for _ in range(n)]

mc = max(l)[1]
mc_sqrt = math.sqrt(mc)

prime = [i for i in range(2, mc + 1)]
c = 0
while True:
    if c >= len(prime):
        break
    t = prime[c]
    prime = [v for v in prime if v == t or v % t != 0]
    c = c + 1
    if c >= mc_sqrt:
        break
        
cum = [0 for i in range(mc + 1)]
for i in range(len(cum)):
    prime_index = bisect.bisect_left(prime, i)
    
    n2 = (i + 1) / 2
    prime_index2 = bisect.bisect_left(prime, n2)
    if len(prime) > prime_index and len(prime) > prime_index2 and prime[prime_index] == i and prime[prime_index2] == n2:
        cum[i] = cum[i - 1] + 1
    else:
        cum[i] = cum[i - 1]
        
for t in l:
    x, y = 0, 0
    try:
        x, y = t
    except:
        print
    p = cum[x] - cum[x - 1]
    if x != y:
        p += cum[y] - cum[x]
    print(p)

### FIXED CODE ###

import sys
import bisect
import math
input = sys.stdin.readline

n = int(input())
l = [list(map(int, input().split())) for _ in range(n)]

mc = 0
for v in l:
    mc = max(mc, v[1])
mc_sqrt = math.sqrt(mc)

prime = [i for i in range(2, mc + 1)]
c = 0
while True:
    if c >= len(prime):
        break
    t = prime[c]
    prime = [v for v in prime if v == t or v % t != 0]
    c = c + 1
    if c >= mc_sqrt:
        break
        
cum = [0 for i in range(mc + 1)]
for i in range(len(cum)):
    prime_index = bisect.bisect_left(prime, i)
    
    n2 = (i + 1) / 2
    prime_index2 = bisect.bisect_left(prime, n2)
    if len(prime) > prime_index and len(prime) > prime_index2 and prime[prime_index] == i and prime[prime_index2] == n2:
        cum[i] = cum[i - 1] + 1
    else:
        if i - 1 < 0:
            cum[i] = 0
        else:
            cum[i] = cum[i - 1]

for t in l:
    x, y = t[0], t[1]
    p = 0
    if 0 <= x - 1:
        p = cum[x] - cum[x - 1]
    if x != y:
        p += cum[y] - cum[x]
    print(p)
a, b, c = [int(i) for i in input().split()]

if a <= c and c <= b:
    print("Yes")
elif: b <= c and c <= a:
    print("Yes")
else:
    print("No")

### FIXED CODE ###

a, b, c = [int(i) for i in input().split()]

if a <= c and c <= b:
    print("Yes")
elif b <= c and c <= a:
    print("Yes")
else:
    print("No")
a,b=map(int,input().split())
if a>b:
    print('GREATER')
elif a<b:
    print('LESS')
else:
    print('EQUAL')

### FIXED CODE ###

a=input()
b=input()
if len(a)>len(b):
    print('GREATER')
elif len(a)<len(b):
    print('LESS')
else:
    n=len(a)
    for i in range(n):
        if a[i]<b[i]:
            print('LESS')
            exit()
        if a[i]>b[i]:
            print('GREATER')
            exit()
    print('EQUAL')
k = input()
k = int(k)

if 1 <= k and k <= 12:
    print(k)
elif 13 <= k and k <= 35:
    temp = k-9
    q = temp // 3
    p = temp % 3
    
    s = ""
    s = s + str(q)
    if p == 0:
        s = s + str(q+1)
    elif p == 1:
        s = s + str(q)
    elif p == 2:
        s = s + str(q-1)
print(s)

### FIXED CODE ###

line = input()
n, k = line.split(" ")
n = int(n)
k = int(k)

temp = n % k
if temp == 0:
    print(0)
elif abs(temp - k) < temp:
    print(abs(temp - k))
elif abs(temp -k) > temp:
    print(temp)
# ARC069D - Menagerie (ABC055D)
def check(a: int, b: int) -> list:
    ret, cur, prev = [], a, b
    for i in S:
        ret += [cur]
        if cur ^ (i == "o"):  # oSo or oWx
            prev, cur = cur, prev ^ 1  # both neighbors are different
        else:  # oSx or oWo
            prev, cur = cur, prev  # both are the same
    flg = cur == a and prev == b  # check the consistency of input and result
    return ret if flg else []


def main():
    global S
    N = int(input())
    S = input().rstrip()
    for a in range(2):
        for b in range(2):
            x = check(a, b)
            if x:
                ans = "".join("S" if i else "W" for i in ans)
                print(ans)
                return
    print(-1)


if __name__ == "__main__":
    main()

### FIXED CODE ###

# ARC069D - Menagerie (ABC055D)
def check(a: str, b: str) -> str:
    ret, cur, prev = "", a, b
    for i in S:
        ret += cur
        if (cur == "S" and i == "o") or (cur == "W" and i == "x"):
            prev, cur = cur, prev
        elif (cur == "S" and i == "x") or (cur == "W" and i == "o"):
            x = "W" if prev == "S" else "S"
            prev, cur = cur, x
    flg = cur == a and prev == b
    return ret if flg else ""


def main():
    global S
    N = int(input())
    S = input().rstrip()
    for a in ("S", "W"):
        for b in ("S", "W"):
            ans = check(a, b)
            if ans:
                print(ans)
                return
    print(-1)


if __name__ == "__main__":
    main()
# -*- coding: utf-8 -*-


n = int(input())
a = []
for i in range(n):
    a.append(int(input()))
if 2 not in a:
    print(-1)
else:
    cnt = 0
    before_num = 1
    lighted_bottons = []
    while True:
        cnt += 1
        if a[before_num - 1] == 2:
            print(cnt)
            break
        else:
            if a[before_num - 1] in lighted_bottons:
                print(-1)
                break
            before_num = a[before_num - 1]
            lighted_bottons.append(before_num)

### FIXED CODE ###

# -*- coding: utf-8 -*-

x, a, b = (int(i) for i in input().split())
if a - b >= 0:
    print("delicious")
elif a + x - b >= 0:
    print("safe")
else:
    print("dangerous")
#!/usr/bin/env python3
# -*- coding: utf-8 -*-


def main():
    N = int(input())
    A = list(map(int, input().split()))
    ans = 1

    for a in A:
        if a == 0:
            ans = 0
            break:
        ans *= a
        if ans > 10**18:
            ans = -1
            break
    
    print(ans)


if __name__ == '__main__':
    main()

### FIXED CODE ###


def main():
    N = int(input())
    A = list(map(int, input().split()))
    ans = 1

    for a in A:
        if a == 0:
            ans = 0
            break
        elif ans < 10**18:
            ans *= a
        
    if ans > 10**18:
        print(-1)
    else:
        print(ans)


if __name__ == '__main__':
    main()
print(sum(1-eval(input().replace(" ", "-")) for _ in range(int(input())))

### FIXED CODE ###

print(sum(1-eval(input().replace(" ","-")) for _ in range(int(input()))))
s = input().split()

if s.count("5") == 2 and s.count("7") = 1:
  print("YES")
else:
  print("NO")

### FIXED CODE ###

s = input().split()

if s.count("5") == 2 and s.count("7") == 1:
  print("YES")
else:
  print("NO")
import math

a,b=map(int,input().split())

def factorization(n):
  factor=[]
  tmp=int(math.sqrt(n))+1
  for num in range(2,tmp):
    while n%num==0:
      n//=num
      factor.append(num)
      break
    if not factor:
      return 'prime number'
    else:
      factor.append(n)
      return factor
a_list=factorization(a)
b_list=factorization(b)

a_b_and=set(a_list)&set(b_list)
print(len(a_b_and)+1)

### FIXED CODE ###

from fractions import gcd

a,b=map(int,input().split())

def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append(i)

    if temp!=1:
        arr.append(temp)

    return arr
  
d = gcd(a,b)
print(len(factorization(d)) + 1)
n, k = map(int, raw_input().split())
d = {}
for i in range(k):
    a, b = map(int, raw_input().split())
    d[a] = b
dp =[[[[0]*(n+1) for i in range(4)] for j in range(4)] for k in range(4)]
def solve(a, b, c, i):
    if a == b == c: return 0
    if i in d and d[i] != c: return 0
    if i == n: return 1
    dp[a][b][c][i] = (solve(b,c,1,i+1) + solve(b,c,2,i+1) + solve(b,c,3,i+1)) % 10000
    return dp[a][b][c][i]
ans = (solve(0,0,1,1) + solve(0,0,2,1) + solve(0,0,3,1)) % 10000
print ans

### FIXED CODE ###

n, k = map(int, raw_input().split())
d = {}
for i in range(k):
    a, b = map(int, raw_input().split())
    d[a] = b
dp =[[[[0]*(n+1) for i in range(4)] for j in range(4)] for k in range(4)]
def solve(a, b, c, i):
    if dp[a][b][c][i]: return dp[a][b][c][i]
    if a == b == c: return 0
    if i in d and d[i] != c: return 0
    if i == n: return 1
    dp[a][b][c][i] = (solve(b,c,1,i+1) + solve(b,c,2,i+1) + solve(b,c,3,i+1)) % 10000
    return dp[a][b][c][i]
ans = (solve(0,0,1,1) + solve(0,0,2,1) + solve(0,0,3,1)) % 10000
print ans
s = input()
q = int(input())

def addflont(s,c):
    return c+s
def addback(s,c):
    return s+c

reverse = 0

for i in range(q):
    t = input()
    if t[0]=="1":
        reverse = reverse^1
    if t[0]=="2":
        if t[2]=="1":
            if reverse==0:
                s = c+s
            else:
                s = s+c
        elif t[2]=="2":
            if reverse==0:
                s = s+c
            else:
                s = c+s

if reverse==1:
    print(s[::-1])
else:
    print(s)


### FIXED CODE ###



s = input()
q = int(input())

def addflont(s,c):
    text = "".join([c,s])
    return text
def addback(s,c):
    text = "".join([s,c])
    return text

reverse = 0
r = "";u = ""
for i in range(q):
    t = input()
    if t[0]=="1":
        reverse = reverse^1
    if t[0]=="2":
        if t[2]=="1":
            if reverse==0:
                r = addflont(r,t[4])
            else:
                u = addback(u,t[4])
        elif t[2]=="2":
            if reverse==0:
                u = addback(u,t[4])
            else:
                r = addflont(r,t[4])

s = r + s + u
if reverse==1:
    print(s[::-1])
else:
    print(s)
def pcmod(n):
    if n==0:
        return 1
    return 1+pcmod(n%bin(n).count('1'))

def main():
    n = int(input())
    x = list(map(int,list(input())))

    m_1 = x.count(1)-1
    m_0 = x.count(1)+1 
    baser_1 = 0
    baser_0 = 0
    if m_1!=0:
        for i in range(n):
            baser_1 += x[i] * pow(2,(n-1-i),m_1)
            baser_1 %= m_1
        
    for i in range(n):
        baser_0 += x[i] * pow(2,(n-1-i),m_0)
        baser_0 %= m_0

    ans = [0]*n

    for i in range(n):
        a = 0
        if x[i]==1:
            t = (baser_1 - pow(2,(n-1-i),m_1))%m_1
            a = pcmod(t)

        if x[i]==0:
            if m_0 ==0:
                ans[i] = 0
                continue
            t = (baser_0 + pow(2,(n-1-i),m_0))%m_0
            a = pcmod(t)
        ans[i] = a

    for a in ans:
        print(a)
if __name__ == "__main__":
    main()

### FIXED CODE ###

def pcmod(n):
    if n==0:
        return 1
    return 1+pcmod(n%bin(n).count('1'))

def main():
    n = int(input())
    x = list(map(int,list(input())))

    m_1 = x.count(1)-1
    m_0 = x.count(1)+1 
    baser_1 = 0
    baser_0 = 0
    if m_1!=0:
        for i in range(n):
            baser_1 += x[i] * pow(2,(n-1-i),m_1)
            baser_1 %= m_1
        
    for i in range(n):
        baser_0 += x[i] * pow(2,(n-1-i),m_0)
        baser_0 %= m_0

    ans = [0]*n

    for i in range(n):
        a = 0
        if x[i]==1:
            if m_1==0:
                ans[i] = 0
                continue
            t = (baser_1 - pow(2,(n-1-i),m_1))%m_1
            a = pcmod(t)

        if x[i]==0:
            t = (baser_0 + pow(2,(n-1-i),m_0))%m_0
            a = pcmod(t)
        ans[i] = a

    for a in ans:
        print(a)
if __name__ == "__main__":
    main()
import sys
while 1:
  H, W = map(int, raw_input().split())
  if H == 0 and W == 0:
    break
  else:
    for h in range(H):
      for w in range(W):
         if (h + w) % 2 == 0:
           sys.stdout.write("#")
         else:
           sys.stdout.write(".")
       print ""
    print ""
 
  

### FIXED CODE ###

import sys
while 1:
  H, W = map(int, raw_input().split())
  if H == 0 and W == 0:
    break
  else:
    for h in range(H):
      for w in range(W):
         if (h + w) % 2 == 0:
           sys.stdout.write("#")
         else:
           sys.stdout.write(".")
      print ""
    print ""
n,m = int(input())
ans = (n - 1) * (m - 1)
print(ans)

### FIXED CODE ###

n,m = map(int,input().split())
ans = (n - 1) * (m - 1)
print(ans)
import numpy as np
H, N = (int(i) for i in input().split())  
AB = [[int(i) for i in input().split()] for i in range(N)] 

dp = [None] * (H+1)
dp[0] = 0

for i in range(1, H+1):
  for a, b in AB:
    if dp[i-a] != None:
      if dp[i] != None:
        dp[i] = min(dp[i], dp[i-a] + b)
      else:
        dp[i] = dp[i-a] + b
  
bef = dp[0]
for i, x in enumerate(dp[1:]):
  if x is None:
    dp[i+1] = bef
    if i == len(dp[1:]) - 1:
      dp[H] = None
  else:
    bef = x
    

ans = np.inf
for a, b in AB:
  ans = min(ans, dp[H-a+1] + b)
if dp[H]:
  ans = min(ans, dp[H])
print(ans)
  

### FIXED CODE ###

import numpy as np
H, N = (int(i) for i in input().split())  

a = np.empty(N, dtype='int')
b = np.empty(N, dtype='int')
dp = np.array([float('inf')]*(H+1))
dp[0] = 0

for i in range(N):
  a[i], b[i] = map(int, input().split())
  
for i in range(1, H+1):
  i_from = i - a
  i_from[i_from<0] = 0
  dp[i] = np.min(dp[i_from] + b)
print(int(dp[H]))
a,b,c = map(int,raw_input().split())

### FIXED CODE ###

# -*- coding: utf-8 -*-

#お店にあるベルは 3 種類で、それぞれ a円、 b円、 c円です。
#この 3 つのうち、異なる 2 つのベルを選んで買うときの、値段の合計の最小値を求めて下さい。

x = input().split()
#x = [700, 600, 780]

y =[int(x[0]), int(x[1]), int(x[2])]

z = sorted(y)

ans = z[0] + z[1]

print(ans)
tmp = input().split(" ")
N = int(tmp[0])
K = int(tmp[1])

num = [0 for i in range(N-1)] 
for i in range(N):
    tmp = input().split(" ")
    a = int(tmp[0])
    b = int(tmp[1])
    num[a-1] = num[a-1] + b

tmp = 0
i = 0
while tmp <= K:
    tmp = tmp + num[i]
    if tmp >= K:
        print(i+1)
    i = i + 1

### FIXED CODE ###

tmp = input().split(" ")
N = int(tmp[0])
K = int(tmp[1])

num = [0 for i in range(10**5)]
for i in range(N):
    tmp = input().split(" ")
    a = int(tmp[0])
    b = int(tmp[1])
    num[a-1] = num[a-1] + b

tmp = 0
i = 0
while tmp < K:
    tmp = tmp + num[i]
    if tmp >= K:
        print(i+1)
    i = i + 1
h,w=map(int,input().split())
lst=list(input() for i in range(h))
n_h=h
for i in range(len(lst)):
    if "#" not in lst[h-i-1]:
        n_h-=1
        lst.pop(h-i-1)
n_w=w
lst=list(map(list,lst))
for i in range(w):
    T=True
    for b in range(n_h):
        if lst[b][w-i-1]=="#":
            T=False
            break
    if T:
        for b in range(h):
            lst[b].pop(w-i-1)
            n_w-=1
for b in range(h):
    print("".join(lst[b]))

### FIXED CODE ###

h,w=map(int,input().split())
lst=list(input() for i in range(h))
n_h=h
for i in range(len(lst)):
    if "#" not in lst[h-i-1]:
        n_h-=1
        lst.pop(h-i-1)
h=n_h
n_w=w
lst=list(map(list,lst))
for i in range(w):
    T=True
    for b in range(h):
        if lst[b][w-i-1]=="#":
            T=False
            break
    if T:
        for b in range(h):
            lst[b].pop(w-i-1)
            n_w-=1
for b in range(h):
    print("".join(lst[b]))
import sys
import math
s_ls = sys.stdin.read().split("\n")[:-1]
a = []
b = []
hp = int(s_ls[0].split()[1])
max_slash = 0
for element in s_ls[1:]:
    slash = int(element.split()[0])
    if slash > max_slash:
        max_slash = slash
    b.append(int(element.split()[1]))
bp = sorted([x for x in b if x > max_slash])[::-1]
count = 0
for e in bp:
    hp -= e
    count += 1
    if hp < 0:
        break
if hp > 0:
    count += math.ceil(hp / max_slash)

print(int(count))

### FIXED CODE ###

print("2018" + input()[4:])
# 初期入力
from decimal import Decimal
import sys
input = sys.stdin.readline
A,B = (str(x) for x in input().split())
a =Decimal(A)
b =Decimal(B)
ans =int(A *B)
print(ans)

### FIXED CODE ###

# 初期入力
from decimal import Decimal
import sys
input = sys.stdin.readline
A,B = (str(x) for x in input().split())
a =Decimal(A)
b =Decimal(B)
ans =int(a *b)
print(ans)
A,B,C = int(input())
if A*B*C == 175:
  print("YES")
else:
  print("NO")

### FIXED CODE ###

A,B,C = map(int,input().split())
if A*B*C == 175:
  print("YES")
else:
  print("NO")
W, H, x, y, = map(int,input().split())


if x-r :
    print("No")
elif x + r :
    print ("No")
elif y-r :
    print ("No")
elif y+r :
    print ("No")
else:
    print ("Yes")


### FIXED CODE ###

W,H,x,y,r = map(int, input().split())
if x-r < 0 or x+r > W or y-r < 0 or y+r > H:
    print("No")
else:
    print("Yes")
import sys

# N個の整数
N = int(input())

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

ans = 10**18
# いくつに書き換えるか
for i in range(min(a),max(a)):
    tmp=0
    for j in range(N):    
        # 書き換える or 書き換えない
        tmp += (a[j]-i)**2
    ans=min(cost,tmp)

print(ans)

### FIXED CODE ###

import sys

# N個の整数
N = int(input())

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

ans = 10**18
# 最小値から最大値の間の値のどれに書き換えるかをループで調べる
for i in range(min(a),max(a)+1):
    tmp=0
    # 試しに入れ替えてみる
    for j in range(N): 
        # 入れ替えたときのコスト計算
        tmp += (a[j]-i)**2
    # 最小値を記録する
    ans=min(ans,tmp)

print(ans)
x = input().rstrip().split("")
count = 0
temp = ""
how = True
for i in x:
  if temp == i:
    how=False
  temp = i

if how:
  print("Good")
else:
  print("Bad")
  

### FIXED CODE ###

x = input().rstrip()
count = 0
temp = ""
how = True
for i in x:
  if temp == i:
    how=False
  temp = i

if how:
  print("Good")
else:
  print("Bad")
import copy
Sd = list(input())
T = list(input())
S = copy.deepcopy(Sd)
flag = 0
for i in range(len(Sd)-len(T)+1):
    if flag == 1:
        break
    for j in range(len(T)):
        if Sd[i+j] != '?' and Sd[i+j] != T[j]:
            Sd = S
            flag = 0
            break
        elif Sd[i+j] == '?':
            Sd[i+j] = T[j]
        if j == len(T)-1:
            flag = 1
if flag == 1:
    l = ['a' if i =='?' else i for i in Sd]
    print(''.join(l))
else:
    print('UNRESTORABLE')
import copy
Sd = list(input())
T = list(input())
S = copy.deepcopy(Sd)
flag = 0
for i in range(len(Sd)-len(T)+1):
    if flag == 1:
        break
    for j in range(len(T)):
        if Sd[i+j] != '?' and Sd[i+j] != T[j]:
            Sd = S
            flag = 0
            break
        elif Sd[i+j] == '?':
            Sd[i+j] = T[j]
        if j == len(T)-1:
            flag = 1
if flag == 1:
    l = ['a' if i =='?' else i for i in Sd]
    print(''.join(l))
else:
    print('UNRESTORABLE')

### FIXED CODE ###

import copy
Sd = list(input())
T = list(input())
S = copy.deepcopy(Sd)
ans = []
for i in range(len(Sd)-len(T)+1):
    for j in range(len(T)):
        if Sd[i+j] != '?' and Sd[i+j] != T[j]:
            Sd = copy.deepcopy(S)
            break
        elif Sd[i+j] == '?':
            Sd[i+j] = T[j]
        if j == len(T)-1:
            l = ['a' if i =='?' else i for i in Sd]
            ans.append(''.join(l))
            Sd = copy.deepcopy(S)
if len(ans) == 0:
    print('UNRESTORABLE')
else:
    print(min(ans))