Language: C++

#include <iostream>

int main(){
  int a; cin >> a;
  int u; u = a/100;
  int l; l = a%100;
  if (1 <= u && u <= 12){
    if (1 <= l && l <= 12){
      cout << "AMBIGUOUS" << endl;
      return 0;
    }
    cout << "MMYY" << endl;
    return 0;
  }
  if (1 <= l && l <= 12){
    cout << "YYMM" << endl;
    return 0;
  }
  cout << "NA" << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:10: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    4 |   int a; cin >> a;
      |          ^~~
      |          std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:9:7: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    9 |       cout << "AMBIGUOUS" << endl;
      |       ^~~~
      |       std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:9:30: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    9 |       cout << "AMBIGUOUS" << endl;
      |                              ^~~~
      |                              std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:12:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   12 |     cout << "MMYY" << endl;
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:12:23: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   12 |     cout << "MMYY" << endl;
      |                       ^~~~
      |                       std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:16:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   16 |     cout << "YYMM" << endl;
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:16:23: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   16 |     cout << "YYMM" << endl;
      |                       ^~~~
      |                       std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:19:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   19 |   cout << "NA" << endl;
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:19:19: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   19 |   cout << "NA" << endl;
      |                   ^~~~
      |                   std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~