#include <iostream>
using namespace std;
int main() {
int N;
cin >> N;
if (N % 10 == 3)
cout << "YES";
else
cout << "NO";
return 0;
}
#include <iostream>
using namespace std;
int main() {
int N;
cin >> N;
if (N % 10 == 3)
cout << "YES";
else
cout << "NO";
return 0;
}