Buggy python submission (verdict: Runtime Error):
import sys
s = sys.stdin.readline()
i = 0
l = len(s)
flag = True
while flag and i <= l:
  if s[i] != s[l-1]:
    flag = False
  i += 1
  l -= 1
l = len(s)
a = s[0:(l-1)/2]
i = 0
l = len(a)
while flag and i <= l:
  if a[i] != a[l-1]:
    flag = False
  i += 1
  l -= 1
b = s[(len(s) + 3)/2 - 1:]
i = 0
l = len(b)
while flag and i <= l:
  if b[i] != b[l-1]:
    flag = False
  i += 1
  l -= 1
if flag:
  print('Yes')
else:
  print('No')


Fixed submission:
import sys
s = sys.stdin.readline().rstrip()
i = 0
l = len(s)
flag = True
while flag and i <= l:
  if s[i] != s[l-1]:
    flag = False
  i += 1
  l -= 1
l = len(s)
a = s[0:-(-(l-1)//2)]
i = 0
l = len(a)
while flag and i <= l:
  if a[i] != a[l-1]:
    flag = False
  i += 1
  l -= 1
b = s[(len(s) + 3)//2 - 1:]
i = 0
l = len(b)
while flag and i <= l:
  if b[i] != b[l-1]:
    flag = False
  i += 1
  l -= 1
if flag:
  print('Yes')
else:
  print('No')

Buggy python submission (verdict: Runtime Error):
import sys
s = sys.stdin.readline()
i = 0
l = len(s)
flag = True
while flag:
  if s[i] != s[l-1]:
    flag = False
  i += 1
  l -= 1
l = len(s)
a = s[0:(l-1)/2 - 1]
i = 0
l = len(a)
while flag:
  if a[i] != a[l-1]:
    flag = False
  i += 1
  l -= 1
b = s[(len(s) + 3)/2 - 1: -1]
i = 0
l = len(b)
while flag:
  if b[i] != b[l-1]:
    flag = False
  i += 1
  l -= 1
if flag:
  print('Yes')
else:
  print('No')

Fixed submission:
import sys
s = sys.stdin.readline().rstrip()
i = 0
l = len(s)
flag = True
while flag and i <= l:
  if s[i] != s[l-1]:
    flag = False
  i += 1
  l -= 1
l = len(s)
a = s[0:-(-(l-1)//2)]
i = 0
l = len(a)
while flag and i <= l:
  if a[i] != a[l-1]:
    flag = False
  i += 1
  l -= 1
b = s[(len(s) + 3)//2 - 1:]
i = 0
l = len(b)
while flag and i <= l:
  if b[i] != b[l-1]:
    flag = False
  i += 1
  l -= 1
if flag:
  print('Yes')
else:
  print('No')

Buggy python submission (verdict: Runtime Error):
S = input()
n = 0
def judge(s):
  i = 0
  N = len(s)
  while i < (N-1) / 2:
    if S[i] != S[N-1]:
      break
    elif i == (N-1)/2:
      n += 1
      break
    else:
      i += 1
judge(S)
judge(S[0 : (len(S)-3)/2])
judge(S[(len(S)+1)/2] : len(S)-1)

if n == 3:
  print("Yes")
else:
  print("No")

Fixed submission:
import sys
s = sys.stdin.readline().rstrip()
i = 0
l = len(s)
flag = True
while flag and i <= l:
  if s[i] != s[l-1]:
    flag = False
  i += 1
  l -= 1
l = len(s)
a = s[0:-(-(l-1)//2)]
i = 0
l = len(a)
while flag and i <= l:
  if a[i] != a[l-1]:
    flag = False
  i += 1
  l -= 1
b = s[(len(s) + 3)//2 - 1:]
i = 0
l = len(b)
while flag and i <= l:
  if b[i] != b[l-1]:
    flag = False
  i += 1
  l -= 1
if flag:
  print('Yes')
else:
  print('No')

Buggy python submission (verdict: Runtime Error):
S = input()
n = 0
def judge(s):
  i = 0
  N = len(s)
  while i < (N-1) / 2
    if S[i] != S[N-1]:
      break
    elif i == (N-1)/2:
      n += 1
      break
    else:
      i += 1
judge(S)
judge(S[0 : (len(S)-3)/2])
judge(S[(len(S)+1)/2] : len(S)-1)

if n == 3:
  print("Yes")
else:
  print("No")

Fixed submission:
import sys
s = sys.stdin.readline().rstrip()
i = 0
l = len(s)
flag = True
while flag and i <= l:
  if s[i] != s[l-1]:
    flag = False
  i += 1
  l -= 1
l = len(s)
a = s[0:-(-(l-1)//2)]
i = 0
l = len(a)
while flag and i <= l:
  if a[i] != a[l-1]:
    flag = False
  i += 1
  l -= 1
b = s[(len(s) + 3)//2 - 1:]
i = 0
l = len(b)
while flag and i <= l:
  if b[i] != b[l-1]:
    flag = False
  i += 1
  l -= 1
if flag:
  print('Yes')
else:
  print('No')

Buggy python submission (verdict: Runtime Error):
S = input()
N = len(S)
n = 0
i = 0

while i < (N-1) / 2
  if S[i] != S[N-1]:
    break
  elif i == (N-1)/2:
    n += 1
    break
  else:
    i += 1
    
s = S[:(N-3)/2]
l = len(s)
i = 0

while i < (l-1) / 2
  if s[i] != s[l-1]:
    break
  elif i == (N-1)/2:
    n += 1
    break
  else:
    i += 1
    
S = S[(N+1)/2:]
i = 0
while i < (l-1) / 2
  if S[i] != S[l-1]:
    break
  elif i == (l-1)/2:
    n += 1
    break
  else:
    i += 1

if n == 3:
  print("Yes")

Fixed submission:
import sys
s = sys.stdin.readline().rstrip()
i = 0
l = len(s)
flag = True
while flag and i <= l:
  if s[i] != s[l-1]:
    flag = False
  i += 1
  l -= 1
l = len(s)
a = s[0:-(-(l-1)//2)]
i = 0
l = len(a)
while flag and i <= l:
  if a[i] != a[l-1]:
    flag = False
  i += 1
  l -= 1
b = s[(len(s) + 3)//2 - 1:]
i = 0
l = len(b)
while flag and i <= l:
  if b[i] != b[l-1]:
    flag = False
  i += 1
  l -= 1
if flag:
  print('Yes')
else:
  print('No')