func_code_string: #include <bits/stdc++.h>   int n;   char s[11];   int main() {     scanf( %d , &n);     int pos = 20000;     for (int i = 1; i <= n; i++) {       int num;       scanf( %d%s , &num, s + 1);       if (s[1] ==  N ) {         if (pos + num > 20000) {           puts( NO );           return 0;         } else           pos += num;       } else if (s[1] ==  S ) {         if (pos - num < 0) {           puts( NO );           return 0;         } else           pos -= num;       } else {         if (pos == 0 || pos == 20000) {           puts( NO );           return 0;         }       }     }     if (pos == 20000)       puts( YES );     else       puts( NO );     return 0;   }   