#include <bits/stdc++.h>
void pt() { std::cout << '\n'; }
template <typename T, typename... Args>
void pt(T a, Args... args) {
  std::cout << a << ' ';
  pt(args...);
}
using namespace std;
const int N = 300005;
int n;
char s[N], t[N];
int sum[N];
void run() {
  cin >> (s + 1);
  for (int i = 1; i <= n; i++) {
    sum[i] = sum[i - 1];
    sum[i] += (s[i] == '(' ? 1 : -1);
  }
  if (sum[n] != 0) {
    pt(0);
    pt(1, 1);
    return;
  }
  int Min = *min_element(sum + 1, sum + n + 1);
  int all = 0, shift;
  for (int i = 1; i <= n; i++) {
    if (sum[i] == Min) shift = i;
  }
  for (int i = shift + 1; i <= n; i++) {
    t[i - shift] = s[i];
  }
  for (int i = 1; i <= shift; i++) {
    t[n - shift + i] = s[i];
  }
  t[n + 1] = '\0';
  strcpy(s + 1, t + 1);
  auto srcp = [&](int p) { return (p + shift - 1) % n + 1; };
  for (int i = 1; i <= n; i++) {
    sum[i] = sum[i - 1];
    sum[i] += (s[i] == '(' ? 1 : -1);
    if (sum[i] == 0) ++all;
  }
  vector<int> ans = {all, 1, 1};
  int last = 0, cnt = 0;
  for (int i = 1; i <= n; i++) {
    if (sum[i] == 2)
      ++cnt;
    else if (sum[i] <= 1) {
      ans = max(ans, std::vector<int>{all + cnt, srcp(last + 1), srcp(i)});
      last = i;
      cnt = 0;
    }
  };
  last = cnt = 0;
  for (int i = 1; i <= n; i++) {
    if (sum[i] == 1)
      ++cnt;
    else if (sum[i] <= 0) {
      ans = max(ans, std::vector<int>{cnt, srcp(last + 1), srcp(i)});
      last = i;
      cnt = 0;
    }
  }
  pt(ans[0]);
  pt(ans[1], ans[2]);
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cout << fixed << setprecision(20);
  while (cin >> n) run();
  return 0;
}
