The translation from the Berland language into the Birland language is not an easy task. Those languages are very similar: a berlandish word differs from a birlandish word with the same meaning a little: it is spelled (and pronounced) reversely. For example, a Berlandish word code corresponds to a Birlandish word edoc. However, it's easy to make a mistake during the «translation». Vasya translated word *s* from Berlandish into Birlandish as *t*. Help him: find out if he translated the word correctly.
The first line contains word *s*, the second line contains word *t*. The words consist of lowercase Latin letters. The input data do not consist unnecessary spaces. The words are not empty and their lengths do not exceed 100 symbols.
"""
n=int(input()); m=int(input()); a=int(input()); b=0
if n%a != 0:
    b=n//a+1
else:
    b=n/a
if m%a != 0:
    b=b*(m//a+1)
else:
    b=b*(m//a)
print(b)
#####
n, m = [int(i) for i in input().split()]
print(m*n//2)
#####
n, k = [int(i) for i in input().split()]
for i in range(k):
    if n%10 == 0:
        n=n/10
    else:
        n=n-1
print(int(n))
#####
import math
n, k = [int(i) for i in input().split()]
a=math.ceil(n/2)
if a >= k:
    print(k*2-1)
if a < k:
    print((k-a)*2)
#####
x=0
n=int(input())
for i in range(n):
    k=input()
    if "++" in k:
        x=x+1
    if "--" in k:
        x=x-1
print(x)
#####
x=input().lower()
y=input().lower()
if x==y:
    print("0")
elif x<y:
    print("-1")
else:
    print("1")
#####
s=input()
if "0000000" in s or "1111111" in s:
    print("YES")
else:
    print("NO")
#####
s=0
for i in range(int(input())):
    n, k = [int(i) for i in input().split()]
    if k-n!=0 and k-n!=1:
        s=s+1
print(s)
"""
s=""
a=input()
b=input()
for i in range(len(a)//2):
    if a[-i]==b[i]:
        s[i]=b[i]
if s==b:
    print("YES")
else:
    print("NO")







