value = input().split()
rows = int(value[0])
colmuns = int(value[1])
OddColNum = colmuns // 2 
EvenColNum = OddColNum
if (colmuns % 2) != 0:
  OddColNum = OddColNum + 1
if (colmuns == 1):
  OddColNum = 1

OddRowCount = rows // 2
EvenRowCount = rows // 2
if (OddRowCount % 2) != 0 and rows != 1:
  OddRowCount = OddRowCount + 1
if (rows == 1):
  OddRowCount = 1

print(OddColNum)
print(EvenColNum)
print(OddRowCount)
print(EvenRowCount)
counts = OddRowCount * OddColNum + EvenColNum * EvenRowCount
print(counts)