#include <bits/stdc++.h>
using namespace std;
int n, r;
double a;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  while (cin >> n >> a) {
    double d = 180.0 / n;
    for (int i = 0; i < n - 1; i++) {
      if (i == n - 2) {
        r = i;
        break;
      }
      if ((double)i * d <= a && (double)(i + 1) * d >= a) {
        if (i == 0) {
          r = i + 1;
          break;
        } else if (fabs((double)i * d - a) < fabs((double)(i + 1) * d - a)) {
          r = i;
          break;
        } else {
          r = i + 1;
          break;
        }
      }
    }
    cout << "2 1 " << 2 + r << endl;
  }
  return 0;
}
