#define _CRT_SECURE_NO_WARNINGS
#include<bits/stdc++.h>
using namespace std;
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
#define ull unsigned long long
#define ll long long
#define clr(v,d) memset(v,d,sizeof(v))
#define ff first
#define ss second
#define all(v) ((v).begin()), ((v).end())
#define allr(v) ((v).rbegin()), ((v).rend())
#define pb push_back
#define iq(v) v.resize(unique(v.begin(),v.end())-v.begin())
#define bye return 0
#define yes cout << "YES\n"
#define no cout << "NO\n"
#define TC int t_t=1;cin>>t_t;while (t_t--)
#define endl '\n'
#define clr(v,d) memset(v,d,sizeof(v))
#define ordered_set tree<int, null_type,less<int>, rb_tree_tag,tree_order_statistics_node_update>
const int oo = 1e9 ;
const ll Mod=1e9+7;
const int N = 2e5+5, M = 1e4+5 ;
int dx[4] = {-1,1,0,0};
int dy[4] = {0,0,1,-1};
void fast(){
std::ios_base::sync_with_stdio(0);
cin.tie(NULL);
#ifndef ONLINE_JUDGE
freopen("Input.txt", "r", stdin);
freopen("Output.txt", "w", stdout);
#endif
}
string to_capital(string x )
{
for (int i=0 ; i<x.size() ;i++)
{
if (islower(x[i]))
x[i] = x[i] - 'a' + 'A' ;
}
return x ;
}
int main() {
fast() ;
string x ;
cin>>x ;
x = to_capital(x) ;
for (int i1 = 0; i1 < x.size(); ++i1) {
if (x[i1] == 'A')
{
for (int i2=i1+1 ; i2<x.size() ;i2++)
{
if (x[i2] == 'T')
{
for (int i3=i2+1 ; i3<x.size() ;i3++)
{
if (x[i3] == 'Y')
{
for (int i4=i3+1 ; i4<x.size() ;i4++)
{
if (x[i4] == 'P')
{
for (int i5=i4+1 ; i5<x.size() ;i5++)
{
if (x[i5] == 'I')
{
for (int i6=i5+1 ; i6<x.size() ;i6++)
{
if (x[i6] == 'C')
{
for (int i7=i6+1 ; i7<x.size() ;i7++)
{
if (x[i7] == 'A')
{
for (int i8=i7+1 ; i8<x.size() ;i8++)
{
if (x[i8] == 'L')
{
cout << "Yes" ;
return 0 ;
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
cout << "No" ;
return 0;
}