#include <bits/stdc++.h>
using namespace std;
template <typename Arg1>
void __f(const char* name, Arg1&& arg1) {
  cerr << name << " : " << arg1 << std::endl;
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args) {
  const char* comma = strchr(names + 1, ',');
  cerr.write(names, comma - names) << " : " << arg1 << " | ";
  __f(comma + 1, args...);
}
int main() {
  int n, a;
  cin >> n >> a;
  float min = INT_MAX, x;
  for (int i = 0; i < n - 2; i++) {
    float angle = ((float)(n - 2 - i) * 180.0) / (float)n;
    if (abs(angle - (float)a) < min) {
      min = (float)(angle - (float)a);
      x = i;
    }
  }
  cout << "1 2 " << (3 + x) << endl;
  return 0;
}
