#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  int n;
  double ang, ang_1, i = 1, j = 2, k = 3, cur_ang, cur_ans = 1e9, a_i, a_j, a_k;
  cin >> n >> ang;
  ang_1 = (180.0 - 360.0 / n) / (n - 2);
  for (cur_ang = ang_1; k <= n; k++, cur_ang += ang_1) {
    if (fabs(ang - cur_ang) < cur_ans) {
      a_i = i;
      a_j = j;
      a_k = k;
      cur_ans = fabs(ang - cur_ang);
    }
  }
  cout << a_j << ' ' << a_i << ' ' << a_k << endl;
  return 0;
}
