#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n, a;
  cin >> n >> a;
  double angle = ((n - 2) * 180);
  angle /= double(n);
  double decr = angle / double(n - 2);
  double ans = 1e9;
  int ind = 0;
  for (int i = 3; i <= n; i++) {
    if (ans > abs(angle - a)) {
      ans = abs(angle - a);
      ind = i;
    }
    angle -= decr;
  }
  cout << 1 << " " << 2 << " " << ind << endl;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  ;
  int test = 1;
  while (test--) {
    solve();
  }
  return 0;
}
