Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <iomanip>
- #include <vector>
- #include <string>
- #include <queue>
- #include <map>
- #include <set>
- #include <string>
- #include <algorithm>
- #include <cmath>
- #include <unordered_map>
- using namespace std;
- #define ll long long
- #define nl endl
- #define cy cout << "YES\n"
- #define cn cout << "NO\n"
- #define sz s.size()
- void sherry()
- {
- ios_base::sync_with_stdio(false), cin.tie(nullptr), cout.tie(nullptr);
- #ifndef ONLINE_JUDGE
- freopen("input.txt", "r", stdin), freopen("output.txt", "w", stdout);
- #endif
- }
- int main()
- {
- sherry();
- string s;
- cin >> s;
- bool flag = true;
- for (int i = 0; i < sz; i++)
- {
- s[i] = tolower(s[i]);
- s[i + 1] = tolower(s[i + 1]);
- if (s[i] != 'a' && s[i] != 'o' && s[i] != 'u' && s[i] != 'i' && s[i] != 'e' && s[i] != 'n')
- {
- if (s[i + 1] != 'a' && s[i + 1] != 'o' && s[i + 1] != 'u' && s[i + 1] != 'i' && s[i + 1] != 'e')
- {
- cn;
- flag = false;
- break;
- }
- }
- }
- if (flag)
- cy;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement