Harryxun/stf_run huggingface dataset:
s=input()
import collections
c = collections.Counter(l)

if (c["N"]!=0 and c["S"]==0) or (c["N"]==0 and c["S"]!=0) or (c["W"]!=0 and c["E"]==0) or (c["W"]==0 and c["E"]!=0):
  print("Yes")
else:
  print("No")
  
  

### FIXED CODE ###

s=input()
import collections
c = collections.Counter(s)

if (c["N"]!=0 and c["S"]==0) or (c["N"]==0 and c["S"]!=0) or (c["W"]!=0 and c["E"]==0) or (c["W"]==0 and c["E"]!=0):
  print("No")
else:
  print("Yes")
N, M = map(int, input().split())

print((1900 * M + 100 * (N - M)) * 2**M)

### FIXED CODE ###

X, Y = input().split()
X, Y = int(X, 16), int(Y, 16)

if X < Y:
    print("<")
elif X > Y:
    print(">")
else:
    print("=")
n,x = map(int,input().split())
a_list = [1]
p_list = [1]
for i in range(n):
  a_list.append(a_list[-1] * 2 + 3)
  p_list.append(p_list[-1] * 2 + 1)
def dfs(n,x):
  if x == 1:
    return 0
  elif 1 < x  and x <= a_list[n-1] +1:
    return dfs(n-1,x-1)
  elif x == a_list[n-1] + 2:
    return p_list[n-1] + 1
  elif a_list[n-1] + 2 < x and x <= 2 * a_list[n-1] + 2:
    return p_list[n-1] + 1 + dfs(n-1,x - (a_list[n-1] + 2))
  elif x == 2 * a_list[i-1] + 3:
    return 2 * p_list[n-1] + 1

print(dfs(n,x))
  

### FIXED CODE ###

n,x = map(int,input().split())
a_list = [1]
p_list = [1]
for i in range(n):
  a_list.append(a_list[-1] * 2 + 3)
  p_list.append(p_list[-1] * 2 + 1)
def dfs(n,x):
  if x == 1:
    return 0
  if n == 1:
    if x ==2:
      return 1
    if x == 3 :
      return 2
    if x == 4 or x == 5:
      return 3
  elif 1 < x  and x <= a_list[n-1] +1:
    return dfs(n-1,x-1)
  elif x == a_list[n-1] + 2:
    return p_list[n-1] + 1
  elif a_list[n-1] + 2 < x and x <= 2 * a_list[n-1] + 2:
    return p_list[n-1] + 1 + dfs(n-1,x - (a_list[n-1] + 2))
  elif x == 2 * a_list[n-1] + 3:
    return 2 * p_list[n-1] + 1

print(dfs(n,x))
W, H, x, y, r = (int(i) for i in input().split())
 
if x - r < 0 or x + r > W or y - r < 0 or y + r > H:
  print "No"
else:
  print "Yes"

### FIXED CODE ###

W, H, x, y, r = (int(i) for i in input().split())
 
if x - r < 0 :
    print("No")
elif x + r > W:
    print("No")
elif  y - r < 0:
    print("No")
elif y + r > H:
  print ("No")
else:
  print ("Yes")
S = input()
white = 0
total = 0
for i in range len(S):
    if S[i] == "W":
        total += (i - white)
        white ++
        
print(total)

### FIXED CODE ###

from sys import stdin

S = stdin.readline().rstrip()
#S = input()
white = 0
total = 0
for i in range(len(S)):
    if S[i] == "W":
        total += (i - white)
        white += 1
        
print(total)
import fractions
def main():
    n, m = map(int, input().split())
    s = input()
    t = input()
    x = [' '] * n*m
    for i in range(n):
        x[i*m] = s[i]
    for i in range(m):
        if x[i*n] == ' ':
            continue
        if x[i*n] != t[i]:
            print(-1)
            return
    print(n * m // fractions.gcd(n, m))

if __name__ == '__main__':
    main()


### FIXED CODE ###

import fractions


def main():
    n, m = map(int, input().split())
    s = input()
    t = input()
    l = n * m // fractions.gcd(n, m)
    x = {}
    for i in range(n):
        x[i * (l // n)] = s[i]
    for i in range(m):
        if i * (l // m) not in x:
            continue
        if x[i * (l // m)] != t[i]:
            print(-1)
            return
    print(l)


if __name__ == '__main__':
    main()
n, q = map(int, input().split())
s = input().strip()
td = [tuple(input().strip().split()) for _ in range(q)]

def is_fall_l(i):
  now = i
  for t, d in td:
    if s[now] == t:
      if d == 'L':
        now -= 1
      else:
        now += 1
    if now == -1:
      return True
  return False

def is_fall_r(i):
  now = i
  for t, d in td:
    if s[now] == t:
      if d == 'L':
        now -= 1
      else:
        now += 1
    if now == n:
      return True
  return False

ll, lr = 0, n-1
while ll != lr:
  mid = (ll + lr) // 2
  if is_fall_l(mid):
    ll = mid + 1
  else:
    lr = mid

rl, rr = 0, n-1
while rl != rr:
  mid = (rl + rr) // 2
  if is_fall_r(mid):
    rr = mid
  else:
    rl = mid + 1

if rl == n-1:
  rl += 1
if lr == 0:
  lr -= 1

print(rl - lr)


### FIXED CODE ###

n, q = map(int, input().split())
s = '*' + input().strip() + '*'
td = [tuple(input().strip().split()) for _ in range(q)]

def fall_d(i):
  now = i
  for t, d in td:
    if s[now] == t:
      if d == 'L':
        now -= 1
      else:
        now += 1
    if now == 0:
      return 'Left'
    elif now == n + 1:
      return 'Right'
  return 'Remain'

ll, lr = 0, n + 1
while ll != lr:
  mid = (ll + lr) // 2
  if fall_d(mid) == 'Left':
    ll = mid + 1
  else:
    lr = mid

rl, rr = 0, n + 1
while rl != rr:
  mid = (rl + rr) // 2
  if fall_d(mid) == 'Right':
    rr = mid
  else:
    rl = mid + 1

print(rr - ll)
X,Y = map(int,input().split())
# 何回移動するか
r = (X+Y)//3
# 移動の可能性 rC(x-r)
from functools import reduce
mod = 10**9+7
if (X+Y)%3==0:
    r = (X+Y)//3
    if r != X and r != Y and r != X*0.5:
        num = reduce(lambda x,y:x*y%mod,[k+1 for k in range(r)])
        p = reduce(lambda x,y:x*y%mod,[k+1 for k in range(X-r)])
        q = reduce(lambda x,y:x*y%mod,[k+1 for k in range(2*r-X)])
        ans = num*pow(p,mod-2,mod)*pow(q,mod-2,mod)%mod
        print(ans%mod)  
    elif r != X and r != Y and r == X*0.5:
        num = reduce(lambda x,y:x*y%mod,[k+1 for k in range(r)])
        p = reduce(lambda x,y:x*y%mod,[k+1 for k in range(X-r)])
        ans = num*pow(p,mod-2,mod)%mod
        print(ans%mod)  
    else:
        print(1)
else:
    print(0)

### FIXED CODE ###

X,Y = map(int,input().split())
# 何回移動するか
r = (X+Y)//3
# 移動の可能性 rC(x-r)
from functools import reduce
mod = 10**9+7

if (X+Y)%3==0 and X<= 2*Y and Y<= 2*X :
    r = (X+Y)//3
    l = min
    if r != X and r != Y:
        num = reduce(lambda x,y:x*y%mod,[k+1 for k in range(r)])
        p = reduce(lambda x,y:x*y%mod,[k+1 for k in range(X-r)])
        q = reduce(lambda x,y:x*y%mod,[k+1 for k in range(2*r-X)])
        ans = num*pow(p,mod-2,mod)*pow(q,mod-2,mod)%mod
        print(ans%mod)   
    else:
        print(1)
else:
    print(0)
#!/usr/bin/env python
l, r = map(int, input().split())
mod = 2019
X = [x%mod for x in list(range(l, r+1))]
X.sort()
ans = X[0]*X[1]
ans %= mod
print(ans)

### FIXED CODE ###

#!/usr/bin/env python
l, r = map(int, input().split())

mod = 2019
if r >= l+mod-1:
    r = l+mod-1
X = [x%mod for x in list(range(l, r+1))]

ans = mod
for i in range(len(X)):
    for j in range(i+1, len(X)):
        ans = min(ans, (X[i] * X[j])%mod)
print(ans)
N = int(raw_input())

for i in xrange(1, 10):	
  for j in xrange(1, 10):
  	if i*j == N:
      print "Yes"
else:
	print "No"

### FIXED CODE ###

N = int(raw_input())

found = False
for i in xrange(1, 10):	
  for j in xrange(1, 10):
    if i*j == N:
      found = True
      
print "Yes" if found else "No"
from collections import defaultdict

def gcd(x, y):
    if x < 0:
        x, y = y, x
    r = x % y
    while r:
        x, y, r = y, r, y%r
    return y
    
def main():
    n = int(input())
    mod = 1000000007
    p = defaultdict(lambda: 0)
    bad = dict()
    zeros = 0
    for _ in range(n):
        a, b = map(int, input().split())
        if a == 0 and b == 0:
            zeros += 1
        else:
            if a == 0:
                p["0"] += 1
                bad["0"] = "INF"
            elif b == 0:
                p["INF"] += 1
                bad["INF"] = "0"
            else:
                g = gcd(a, b)
                a //= g
                b //= g
                sp = f"{a}_{b}"
                if b < 0:
                    b *= -1
                    a *= -1
                sm = f"{b}_{-a}"
                p[sp] += 1
                bad[sp] = sm
    done = set()
    good = 0
    for key, num in p.items():
        if key in done:
            continue
        b = a[bad[key]]
        done.add(bad[key])
        if b > 0:
            ans *= pow(2, b, mod)*pow(2, num, mod)-1
            ans %= mod
        else:
            good += num
    ans *= pow(2, good, mod)
    ans += zeros
    ans -= 1
    ans %= mod
    print(ans)
        
        

if __name__ == "__main__":
    main()

### FIXED CODE ###

from collections import defaultdict

def gcd(x, y):
    r = x % y
    while r:
        x, y, r = y, r, y%r
    return y
    
def main():
    n = int(input())
    al = defaultdict(lambda: 0)
    All = 0
    mod = 1000000007
    goods = dict()
    for i in range(n):
        a, b = map(int, input().split())
        if a == 0 and b == 0:
            All += 1
        elif b == 0:
            al["inf"] += 1
            goods["inf"] = "0"
        elif a == 0:
            al["0"] += 1
            goods["0"] = "inf"
        else:
            g = gcd(b, a)
            a_key = f"{a//g},{b//g}"
            if b//g < 0:
                good = f"{-b//g},{a//g}"
            else:
                good = f"{b//g},{-a//g}"
            goods[a_key] = good
            al[a_key] += 1
    ans = 1
    al = dict(al)
    done = set()
    ok = 0
    for k, v in al.items():
        if k in done:
            continue
        num = al.get(goods[k])
        done.add(goods[k])
        if num:
            ans *= pow(2, num, mod)+pow(2, v, mod)-1
            ans %= mod
        else:
            ok += v
    ans *= pow(2, ok, mod)
    ans += All - 1
    ans %= mod
    print(ans)
        
        
            
    

if __name__ == "__main__":
    main()
a, b = map(int, raw_input().split()):

if  a > b :
print "a > b"
if  a < b :
print "a < b"
if  a == b :
print "a == b"

### FIXED CODE ###

a,b=map(int,raw_input().split())
if a > b:
    print 'a > b'
elif a < b:
    print 'a < b'
else:
    print 'a == b'
import sys
n,m=map(int,input().split())
x =list(map(int,input().split()))

if m==1:
    print(0)
    sys.exit()

x.sort()

diff=[0]*(m-1)

for i in range(m-1):
    diff[i]=x[i+1]-x[i]

diff.sort()

ans=0
if n<=m:
    for i in range(m-n):
        ans+=diff[i]
else:
    for i in range(diff.size()):
        ans+=diff[i]

print(ans)


### FIXED CODE ###

import sys
n,m=map(int,input().split())
x =list(map(int,input().split()))

ans=0
if n>=m:
    ans=0
else:
    x.sort()
    diff=[0]*(m-1)

    for i in range(m-1):
        diff[i]=x[i+1]-x[i]

    diff.sort()

    ans=0
    
    for i in range(m-n):
        ans+=diff[i]

print(ans)
a,b,c = map(int, input().split())
if a == b or b == c or c == a:
  return "Yes"
else:
  return "No"

### FIXED CODE ###

a,b,c = map(int, input().split())
ispoor = False
if (a == b and b!=c) or (b == c and a!=b) or (c==a and c!=b):
    ispoor = True
if ispoor:
    print("Yes")
else:
    print("No")
import sys


def parallelism(x1, y1, x2, y2, x3, y3, x4, y4):
    if x1 == x2 or x3 == x4:
        return x1 == x2 and x3 == x4
#    elif y1 == y2:
#        return y3 == y4
    else:
        return ((y2 - y1) / (x2 - x1)) == ((y4 - y3) / (x4 - x3))



#input_file = open(sys.argv[1], "r")

#lines = input_file.readlines()
lines = sys.stdin.readlines()
lines.pop(0)

for line in lines:
    x1, y1, x2, y2, x3, y3, x4, y4 = tuple(map(float, line.split(' ')))
    if parallelism(x1, y1, x2, y2, x3, y3, x4, y4):
        print "YES"
    else:
        print "NO"

### FIXED CODE ###


import sys


def parallelism(x1, y1, x2, y2, x3, y3, x4, y4):
    if x2 - x1 == 0.0 or x4 - x3 == 0.0:
        return x2 - x1 == 0.0 and x4 - x3 == 0.0
    else:
        return ((y2 - y1) / (x2 - x1)) == ((y4 - y3) / (x4 - x3))


#lines = sys.stdin.readlines()
#lines.pop(0)

for i in range(input()):
    x1, y1, x2, y2, x3, y3, x4, y4 = tuple(map(float, raw_input().split(' ')))
    if parallelism(x1, y1, x2, y2, x3, y3, x4, y4):
        print "YES"
    else:
        print "NO"
n,l = map(int,input().split())
list = []

for i in range(n):
    word = input()
    list.append(word)

list_connect = "".join(sorted(list))


print(list_connect)

### FIXED CODE ###

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

if list == [5,5,7]:
    print("YES")
elif list == [5,7,5]:
    print("YES")
elif list == [7,5,5]:
    print("YES")
else:
    print("NO")
n=int(input())
a=list(map(int,input().split()))
def order(a):
    if a == [1]:
        return [1]
    else:
        x = order(a[:-1])
        y = a[-1]
        x.insert(y-1,y)
        return x
print(*order(a),sep="\n")

### FIXED CODE ###

n=int(input())
a=list(map(int,input().split()))
for i in range(n):
    if a[i]>i+1:
        print(-1)
        exit()
def order(a):
    if a == [1]:
        return [1]
    else:
        x = order(a[:-1])
        y = a[-1]
        x.insert(y-1,y)
        return x
print(*order(a),sep="\n")
N = int(input())
A=list(map(int, input().split()))

def sol(i,want):
    num=int(N/(i+1))
    wa=-A[0]
    for j in range(num):
        wa+=A[i+j*i]
    wa=wa%2
    if wa==want:
        x=0
    else:
        x=1
#     print(num)
    return x 

B=A[:]
for i in range(half):
    j=half-1-i
    print(j)
    B[j]=sol(j,A[j])
print(sum(B))
for b in B:
    print(b)

### FIXED CODE ###

N = int(input())
A=list(map(int, input().split()))




def sol(i,want):
    num=N//(i+1)
    wa=B[i]

    for j in range(num):
        k=i+j*(i+1)
        wa+=B[k]
#         print(i,wa,B[i])
#         print((i+1)+j*(i+1)-1)
#     print(i,wa,B[i])
    wa=wa%2
#     print(i,wa,A[i])
    
    if wa==want:
        x=0
    else:
        x=1
#     print(num)
    return x 

B=A[:]
half=N//2
for i in range(half):
    j=half-1-i
#     print(j)
    B[j]=sol(j,A[j])
    
C=[i+1 for i, x in enumerate(B) if x ==1]

m=sum(B)
print(m)
print(*C)
n,m=[int(i) for i in input().split()]
badone=[int(input()) for i in range(m)]
badstares=[1 for i in range(n)]
for i in badone:
    badstares[i-1]=0


stares=[-1 for i in range(n)]
for i in range(n):
    
    i=n-1-i
    if i==n-1:
        stares[i]=1
    elif i==n-2:
        if badstares[i]==0:
            stares[i]=-1
        else:
            stares[i]=1
    else:
        if badstares[i]==0:
            stares[i]=-1
        else:
            if stares[i+1]==-1 and stares[i+2]==-1:
                    stares[i]=-1
            elif stares[i+1]==-1 and stares[i+2]!=-1:
                    stares[i]=stares[i+2]
            elif stares[i+2]==-1:
                stares[i]=stares[i+1]
            else:
                stares[i]=stares[i+1]+stares[i+2]
    
if stares[0]==-1 and stares[1]==-1:
    print(0)
elif stares[0]==-1:
    print(stares[1]%1000000007)
elif stares[1]==-1:
    print(stares[0]%1000000007)
else:
    print((stares[0]+stares[1])%1000000007)

### FIXED CODE ###

n,m=[int(i) for i in input().split()]
badone=[int(input()) for i in range(m)]
badstares=[1 for i in range(n)]
for i in badone:
    badstares[i-1]=0


stares=[-1 for i in range(n)]
if n==1:
    print(1)
else:
    for i in range(n):

        i=n-1-i
        if i==n-1:
            stares[i]=1
        elif i==n-2:
            if badstares[i]==0:
                stares[i]=-1
            else:
                stares[i]=1
        else:
            if badstares[i]==0:
                stares[i]=-1
            else:
                if stares[i+1]==-1 and stares[i+2]==-1:
                        stares[i]=-1
                elif stares[i+1]==-1 and stares[i+2]!=-1:
                        stares[i]=stares[i+2]
                elif stares[i+2]==-1:
                    stares[i]=stares[i+1]
                else:
                    stares[i]=stares[i+1]+stares[i+2]

    if stares[0]==-1 and stares[1]==-1:
        print(0)
    elif stares[0]==-1:
        print(stares[1]%1000000007)
    elif stares[1]==-1:
        print(stares[0]%1000000007)
    else:
        print((stares[0]+stares[1])%1000000007)
n,k = map(int,input().split())
a = [int(i) for i in input().split()]

mod = 10**9+7

pl = 0
zr = 0
mn = 0

a.sort()

for i in range(n):
    if a[i] == 0:
        zr += 1
    elif a[i] > 0:
        pl += 1
    elif a[i] < 0:
        mn += 1

hugo = 0

tmp = k-pl
        
if zr == 0 and pl == 0 and k % 2 == 1:
    hugo = 3#mn
elif zr == 1 and pl == 0 and k % 2 == 1:
    hugo = 2#zr
else:
    hugo = 1#pl

ans = 1
tmp_ans = 1
    
if hugo == 3:
    for i in range(k):
        ans *= a[mn-1-i]
        ans %= mod
    print(ans%mod)
elif hugo == 2:
    print(0)
else:
    if mn == 0:
        for i in range(k):
            tmp_ans *= a[n-1-i]
            tmp_ans %= mod
        print(tmp_ans)
    else:
        tmp = k
        pl_num = 0
        mn_num = 0
        while tmp > 0:
            if tmp >= 2:
                tmp -= 2
                tmp_p_seki = a[pl_num+0]*a[pl_num+1]
                tmp_m_seki = a[mn_num+0]*a[mn_num+1]
                if tmp_p_seki > tmp_m_seki:
                    tmp_seki = tmp_p_seki
                    pl_num += 2
                else:
                    tmp_seki = tmp_m_seki
                    mn_num += 2
            elif tmp == 1:
                tmp_seki = pl[pl_num]
                tmp -= 1
            tmp_ans *= tmp_seki
            tmp_ans %= mod
                    
            
        print(tmp_ans%mod)

### FIXED CODE ###

n,k = map(int,input().split())
a = [int(i) for i in input().split()]

mod = 10**9+7

pl = 0
zr = 0
mn = 0

a.sort()

for i in range(n):
    if a[i] == 0:
        zr += 1
    elif a[i] > 0:
        pl += 1
    elif a[i] < 0:
        mn += 1

hugo = 0

#tmp = k-pl
        
if zr == 0 and pl == 0 and k % 2 == 1:
    hugo = 3#mn
elif zr >= 1 and pl == 0 and k % 2 == 1:
    hugo = 2#zr
else:
    hugo = 1#pl

ans = 1
tmp_ans = 1
    
if hugo == 3:
    for i in range(k):
        ans *= a[mn-1-i]
        ans %= mod
    print(ans%mod)
elif hugo == 2:
    print(0)
else:
    if mn == 0:
        for i in range(k):
            tmp_ans *= a[n-1-i]
            tmp_ans %= mod
        print(tmp_ans)
    else:
        tmp = k
        pl_num = 0
        mn_num = 0
        if tmp % 2 == 1:
            tmp -= 1
            pl_num += 1
            tmp_ans = a[n-1]
        while tmp > 0:
            if tmp >= 2:
                tmp -= 2
                tmp_p_seki = 0
                tmp_m_seki = 0
                if pl_num+1 <= pl:
                    tmp_p_seki = a[n-1-pl_num]*a[n-1-pl_num-1]
                if mn_num+1 <= mn:
                    tmp_m_seki = a[mn_num+0]*a[mn_num+1]
                if tmp_p_seki > tmp_m_seki:
                    tmp_seki = tmp_p_seki
                    pl_num += 2
                elif tmp_p_seki == 0 and tmp_m_seki == 0:
                    tmp_seki = 0
                else:
                    tmp_seki = tmp_m_seki
                    mn_num += 2
            #elif tmp == 1:
            #    tmp_seki = a[n-1-pl_num]
            #    tmp -= 1
            tmp_ans *= tmp_seki
            tmp_ans %= mod
                    
            
        print(tmp_ans%mod)
N, M = map(int, input().split())
A = [int(input()) for _ in range(M)]
MOD = 1000000007
def Fib(n, A, MOD, memo={}):
    if n in A:
        return 0
    elif n == 1:
        return 1
    elif n == 2:
        if 1 in A:
            return 1
        else:
            return 2
    elif n in memo:
        return memo[n]
    else:
        memo[n] = ( Fib(n-1, A, MOD, memo) + Fib(n-2, A, MOD, memo) ) % MOD
        return memo[n]

print(Fib(N, A, MOD))


### FIXED CODE ###

N, M = map(int, input().split())
A = set([int(input()) for _ in range(M)])
MOD = 1000000007
memo = [0]*(N+1)
memo[0] = 1
if 1 not in A:
    memo[1] = 1
for i in range(2, N+1):
    if i not in A:
        memo[i] = (memo[i-2] + memo[i-1])%MOD
print(memo[N])
s = ''
for i in range(3):
  l = [int(j) for j in input().split()]
  s += l[i]
print(s)

### FIXED CODE ###

s = ''
for i in range(3): s += input()[i]
print(s)
k=int(input())
n=int(input())
n_list=[int(input()) for i in range(n)]
for i in range(len(n_list)):
  if n_list[i] > k-n_list[i]:
    n_list[i]=-(k-n_list[i])
n_list.sort()
print(n_list[-1]-n_list[0])


### FIXED CODE ###

(n,m)=map(int,input().split())
a=input().split()
a=list(map(int,a))
l=[]
k=0
a=sorted(a)
for i in range(m-1):
    d=abs(a[i]-a[i+1])
    k=k+d
    l.append(d)
# k=k-d
c=n-k
l.append(c)
l=sorted(l)

print(n-l[-1])
import sys
def input(): return sys.stdin.readline().rstrip()
import numpy as np
def main():
    r=int(input())
    print(2*np.pi*r)

if __name__=='__main__':
    main()

### FIXED CODE ###

import sys
def input(): return sys.stdin.readline().rstrip()
import numpy as np
def main():
    r=int(input())
    print(2*np.pi*r)

if __name__=='__main__':
    main()
n,m = map(int,input().split())
p,S = list(map(int,input().split()))
ac = 0
wa = 0
for j in range(n):
  for i in range(m):
    if S[i] == "AC":
      ac += 1
      i += 1
      j += 1
    else:
      wa = 0
      i += 1

### FIXED CODE ###

N,M = map(int,input().split())
AC = 0
penalty = 0
AC_list = [0]*N
WA_list = [0]*N

for i in range(M):
  p,s = map(str,input().split())
  p = int(p)-1
  if s == "AC" and AC_list[p] == 0:
    AC += 1
    AC_list[p] = 1
    penalty += WA_list[p]
  elif s == "WA":
    WA_list[p] += 1
  if AC == N:
    break
print(AC,penalty)
r=0
s=input()
for n in len(s):
  if s[n]!=s[-(n+1)]:
    r+=1
print(r/2)

### FIXED CODE ###

r = 0
s = input()
for n in range(len(s)):
  if s[n] != s[-n-1]:
    r += 1
print(r//2)
n = int(input())
count = 0

for i in range(n):
    d1, d2 = map(int,input().split())

    if d1 == d2 :
        count += 1
    else:
        count = 0

    if count == 3:
        flag = 1;


if flag == 1:
    print("Yes")
else:
    print("No")

### FIXED CODE ###

n = int(input())
count = 0
flag = 0

for i in range(n):
    d1, d2 = map(int,input().split())

    if d1 == d2 :
        count += 1
    else:
        count = 0

    if count == 3:
        flag = 1


if flag == 1:
    print("Yes")
else:
    print("No")
S = input()
T = intpu()

score = 0
if S[0]==T[0]:
	score = score +1
  
if S[1]==T[1]:
    score=score+1
    
if S[2]==T[2]:
	score=score*1

print(score)
    

### FIXED CODE ###

S=input()
T=input()

score=0

if S[0] == T[0]:
  	score=score+1
if S[1] == T[1]:
  	score=score+1
if S[2] == T[2]:
	score=score+1
 
print(score)
a = list(input())

b = list(input())

aa = len(a)

bb = len(b)

dp = [[]*(m+1) for i in range(n+1)]

for i in range(n):
	for j in range(m):
		if a[i] == b[j]:
			dp[i+1][j+1] = dp[i][j] + 1
		else:
			dp[i+1][j+1] = max(dp[i][j+1],dp[i+1][j])

ans = ""

while aa > 0 and bb > 0:
	if a[n-1] == b[m-1]:
		aa -= 1
		bb -= 1
		ans += a[aa]
	elif dp[aa][bb-1] > dp[a-1][b]:
		aa -= 1
	else:
		bb -= 1
print(ans[::-1])

### FIXED CODE ###

a = input()
b = input()

aa = len(a)

bb = len(b)

dp = [[0]*(bb+1) for i in range(aa+1)]

for i in range(aa):
	for j in range(bb):
		if a[i] == b[j]:
			dp[i+1][j+1] = dp[i][j] + 1
		else:
			dp[i+1][j+1] = max(dp[i][j+1],dp[i+1][j])

ans = ""

while aa > 0 and bb > 0:
	if a[aa-1] == b[bb-1]:
		aa -= 1
		bb -= 1
		ans += a[aa]
	elif dp[aa][bb-1] > dp[aa-1][bb]:
		bb -= 1
	else:
		aa -= 1
print(ans[::-1])
N,*a=map(int,open(0));n=N//2-1;a.sort();print(2*sum(a[n+2:])-2*sum(a[:n])+a[n+1]-a[n]-[0,min(a[n]+a[n+2],2*a[n+1])][N%2])

### FIXED CODE ###

#!/usr/bin/env python3
N, *a = map(int, open(0))
n = N//2 - 1
a.sort()
print(2*sum(a[n+2:]) - 2*sum(a[:n]) + a[n+1] - a[n] - (min(a[n]+a[n+2], 2*a[n+1]) if N%2 else 0))
N = int(input())
ans = 1
 
i = [int(a) for a in input().split()]
 
if 0 in i:
  print(0)
 
for b in range(N):
  ans = ans * i[b]
 
  if ans > 10**18:
   	 ans = -1
     break
 
print(ans)

### FIXED CODE ###

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

ans = 1

if 0 in a:
    print("0")
    exit()

for i in a:
    ans *= i

    if ans > 10**18:
        print("-1")
        exit()
        
print(ans)
9 9 2


### FIXED CODE ###

a, b, x = map(int, input().split())
print(b//x-(a-1)//x)
l,r=map(int,input().split())
lst=[range(l,r+1)]
def div(n):
  return n%2019
lst=map(div,lst)
lst.sort()
print(lst[0]*lst[1])
  

### FIXED CODE ###

import sys
l,r=map(int,input().split())

if 2018<=r-l:
  print(0)
  sys.exit()

L=l%2019
R=r%2019
m=2018

if L>R:
  print(0)
  sys.exit()

  
for i in range(L,R):
  for j in range(i+1,R+1):
    m=min((i*j)%2019,m)

print(m)
N = int(input())
T, A = input().split()
T = int(T)
A = int(A)
H = [int(i) for i in input().split()]

n = 0
for i in range(N):
    if abs(A - (T - H[i] * 0.006) > abs(A - (T - H[n] * 0.006):
       n = i

print(n + 1)

### FIXED CODE ###

N = int(input())
T, A = input().split()
T = int(T)
A = int(A)
H = [int(i) for i in input().split()]

n = 0
for i in range(N):
    if abs(A - (T - H[i] * 0.006)) < abs(A - (T - H[n] * 0.006)):
       n = i

print(n + 1)
n = int(input())

ans = int((n-1)*n)/2)

print(ans)

### FIXED CODE ###

n = int(input())

ans = ((n-1)*n)//2

print(ans)