#include <bits/stdc++.h>
using namespace std;
int main() {
  std::ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n, a;
  cin >> n >> a;
  double angle = (180 * (n - 2)) / double(n);
  int t = n - 2;
  double alpha = angle / double(n - 2);
  int cnt = 1, ctr = 1;
  int ans = 1;
  double minn = 1e9;
  while (t--) {
    if (fabs(a - alpha * double(cnt)) < minn) {
      ans = ctr;
      minn = abs(a - alpha * cnt);
    }
    ctr++;
    cnt++;
  }
  cout << n << " 1 " << n - ans;
  return 0;
}
