#include <iostream>
#include <stack>
using namespace std;
void solve(string &s){
stack<char> cur;
for(int i = 0; i < s.size(); i++){
if(!cur.empty() && ((cur.top() == '(' && s[i] == ')') || (cur.top() == '{' && s[i] == '}') || (cur.top() == '[' && s[i] == ']')))
cur.pop();
else cur.push(s[i]);
}
if(cur.empty()) cout << "YES";
else cout << "NO";
signed main() {
string str;
cin >> str;
solve(str);
#include <vector>
int n,m,A;
cin >> n >> m >> A;
vector<vector<double>> a(n,vector<double>(m));
for(int i = 0; i < n; i++)
for(int j = 0; j < m; j++)
cin >> a[i][j];
vector<double> b(n,1);
vector<bool> ok(n,false);
for(int i = 0; i < m; i++)
for(int j = 0; j < n; j++)
if(a[j][i] < A){
b[i] *= a[j][i];
ok[i] = true;
for(int i = 0; i < b.size(); i++){
if(!ok[i]) b[i] = 0;
cout << b[i] << " ";
#include <iostream>
#include <stack>
using namespace std;
void solve(string &s){
stack<char> cur;
for(int i = 0; i < s.size(); i++){
if(!cur.empty() && ((cur.top() == '(' && s[i] == ')') || (cur.top() == '{' && s[i] == '}') || (cur.top() == '[' && s[i] == ']')))
cur.pop();
else cur.push(s[i]);
}
if(cur.empty()) cout << "YES";
else cout << "NO";
}
signed main() {
string str;
cin >> str;
solve(str);
}
#include <iostream>
#include <vector>
using namespace std;
signed main() {
int n,m,A;
cin >> n >> m >> A;
vector<vector<double>> a(n,vector<double>(m));
for(int i = 0; i < n; i++)
for(int j = 0; j < m; j++)
cin >> a[i][j];
vector<double> b(n,1);
vector<bool> ok(n,false);
for(int i = 0; i < m; i++)
for(int j = 0; j < n; j++)
if(a[j][i] < A){
b[i] *= a[j][i];
ok[i] = true;
}
for(int i = 0; i < b.size(); i++){
if(!ok[i]) b[i] = 0;
cout << b[i] << " ";
}
}