#include <iostream>
#include <bits/stdc++.h>
#define mod 998244353
#define point complex<long double>
#define pi acos(-1)
#define pb push_back


typedef long long ll;
typedef long double ld;

using namespace std;

void Fastio(){
    ios::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
}

long long adotb(point a, point b){
    return (conj(a)*b).real();
}

long long acrossb(point a, point b){
    return (conj(a)*b).imag();
}

long long sinseta(point a, point b){
    return abs(acrossb(a,b)/(abs(a)*abs(b)));
}
ll fact[1000006], inv[1000006];

ll fp(ll base, ll exp)
{
    if (exp == 0)
        return 1;
    ll ans = fp(base, exp / 2);
    ans = (ans * ans)%mod ;
    if (exp % 2 != 0)
        ans = (ans * (base % mod)) % mod;
    return ans;
}

void calcFacAndInv(ll n)
{
    fact[0] = inv[0] = 1;
    for (ll i = 1; i <= n; i++)
    {
        fact[i] = (i * fact[i - 1]) % mod;
        inv[i] = fp(fact[i], mod - 2);
    }
}

ll ncr(ll n, ll r)
{
    if(n<r)return 0;
    return (((fact[n] * inv[r]) % mod) * inv[n - r]) % mod;
}

ll npr(ll n, ll r)
{
    return (fact[n] * inv[n - r]) % mod;
}

ll lcm(ll a, ll b){
    return (a*b)/__gcd(a,b);
}
long double  NCR(int n, int m){
    if(n<m)return 0;
    long double res = 1;
    m = min(m, n - m);
    for(int i = 0; i < m; i++){
        res = res * ( n - i) / (i + 1);
 }
    return res;
}
ll stolong(string a){
    ll res=0;
    while(a[0]=='0'){
        a.erase(a.begin());
    }
    if(a=="")a="0";
    for(int i=0; i<a.size(); i++){
        res*=10; res+=a[i]-'0';
    }
    return res;
}
const int MAXN=1e7+2;
int spf[MAXN];
void sieve()
{
    spf[1] = 1;
    for (int i=2; i<MAXN; i++)
        spf[i] = i;

    for (int i=4; i<MAXN; i+=2)
        spf[i] = 2;

    for (int i=3; i*i<MAXN; i++)
    {
        if (spf[i] == i)
        {
            for (int j=i*i; j<MAXN; j+=i)
                if (spf[j]==j)
                    spf[j] = i;
        }
    }
}

set<int> getFactorization(int x)
{
    set<int> ret;
    while (x != 1)
    {
        ret.insert(spf[x]);
        x = x / spf[x];
    }
    return ret;
}
class data{
    public:
    ll c, i, k, sum;
    data(){}
    data(int cc, int ii, int kk){
        c=cc; i=ii; k=kk; calc();
    }
    void calc(){sum=c+i*k;}
    bool operator <(data& d)const {
        return sum <= d.sum;
    }

};

double distance(point a, point b){
    return abs(b-a);
}

string ltobin(int x){
    string res="";
    while(x){
        res+=('0'+(x%2)); x/=2;
    }
    reverse(res.begin(), res.end());
    return res;
}
ll bintol(string a){
    ll res=0;
    reverse(a.begin(), a.end());
    for(int i=0; i<a.size(); i++){
        if(a[i]=='1')res+=pow(2,i);
    }
    return res;
}
void primeFactors(int n)
{
    while (n % 2 == 0 && n)
    {
        cout<<2<<" ";
        n = n/2;
    }
    for (int i = 3; i <= sqrt(n); i = i + 2)
    {
        while (n % i == 0)
        {
            cout<<i<<" ";
            n = n/i;
        }
    }
    if (n > 2)
        cout<<n<<" ";
}

vector<int> SIEVE(int n){
    int p[n+1]={0};
    for(int i=2; i<=n; i++){
        for(int y=i+i; y<=n; y+=i){p[y]=1;}
    }
    vector<int>v;
    for(int i=2; i<=n; i++){
        if(!p[i])v.push_back(i);
    }
    return v;
}
const int N=2e4+5;
int par[N], rnk[N];
// par is initialized by each index, and rnk is initialized by 1
void init(){
    for(int i=0; i<N; i++){
        par[i]=i; rnk[i]=1;
    }
}
int findp(int x)
{
    return (par[x] == x? x: par[x] = findp(par[x]));
}

bool iscon(int x, int y)
{
    return (findp(x) == findp(y));
}

void con(int x, int y)
{
    x = findp(x), y = findp(y);
    if (rnk[x] > rnk[y])
        swap(x, y);
    par[x] = y;
    if (rnk[x] == rnk[y])
        rnk[y]++;
}

int main()
{
    Fastio();
    int ttt=1; //cin>>ttt;
    while(ttt--){
        string a, b; cin>>a>>b;
        reverse(b.begin(), b.end());
        if(a==b)cout<<"YES\n";
        else cout<<"NO\n";
    }

    return 0;
}


Measured memory_bytes: 3644