Language: C++

#include <iostream>
#include <stack>
#include <vector>
uging namespace std;
int main()
{
	string str;
	while( getline(cin,str) && str != '.' ){
		string z;
		for(int i=0;i<str.size();i++)
			if(str[i] == '(' || str[i] == ')' || str[i] == '[' || str[i] == ']')
				z+=str[i];
		stack<char> s;
		bool f = true;
		for(int  i=0;i < z.length();i++){
			if( z.empty() || z[i] == '(' || z[i] == '[' ){
				s.push();
			}else if( (s.top() == '(' && z[i] == ')') || (s.top() == '[' && z[i] == ']') )
				s.pop();
			else{
				f = false;
				break;
			}
		}
		cout << (f && s.empty() ? "yes": "no")  << endl;
	}

	return 0;
}

Compiler output:
a.cc:4:1: error: 'uging' does not name a type
    4 | uging namespace std;
      | ^~~~~
a.cc: In function 'int main()':
a.cc:7:9: error: 'string' was not declared in this scope
    7 |         string str;
      |         ^~~~~~
a.cc:7:9: note: suggested alternatives:
In file included from /usr/include/c++/14/iosfwd:41,
                 from /usr/include/c++/14/ios:40,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
In file included from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44:
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:8:24: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    8 |         while( getline(cin,str) && str != '.' ){
      |                        ^~~
      |                        std::cin
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:8:28: error: 'str' was not declared in this scope; did you mean 'std'?
    8 |         while( getline(cin,str) && str != '.' ){
      |                            ^~~
      |                            std
a.cc:9:23: error: expected ';' before 'z'
    9 |                 string z;
      |                       ^~
      |                       ;
a.cc:12:33: error: 'z' was not declared in this scope
   12 |                                 z+=str[i];
      |                                 ^
a.cc:13:17: error: 'stack' was not declared in this scope; did you mean 'std::stack'?
   13 |                 stack<char> s;
      |                 ^~~~~
      |                 std::stack
In file included from /usr/include/c++/14/stack:63,
                 from a.cc:2:
/usr/include/c++/14/bits/stl_stack.h:99:11: note: 'std::stack' declared here
   99 |     class stack
      |           ^~~~~
a.cc:13:23: error: expected primary-expression before 'char'
   13 |                 stack<char> s;
      |                       ^~~~
a.cc:15:34: error: 'z' was not declared in this scope
   15 |                 for(int  i=0;i < z.length();i++){
      |                                  ^
a.cc:17:33: error: 's' was not declared in this scope
   17 |                                 s.push();
      |                                 ^
a.cc:18:36: error: 's' was not declared in this scope
   18 |                         }else if( (s.top() == '(' && z[i] == ')') || (s.top() == '[' && z[i] == ']') )
      |                                    ^
a.cc:25:17: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   25 |                 cout << (f && s.empty() ? "yes": "no")  << 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:25:31: error: 's' was not declared in this scope
   25 |                 cout << (f && s.empty() ? "yes": "no")  << endl;
      |                               ^
a.cc:25:60: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   25 |                 cout << (f && s.empty() ? "yes": "no")  << endl;
      |                                                            ^~~~
      |                                                            std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~