#include <bits/stdc++.h>
using namespace std;
class Solution {
 public:
  void solve(std::istream& in, std::ostream& out) {
    int n, a;
    in >> n >> a;
    double max_angle = (n - 2) * 180.0 / n;
    int min_i = 1;
    for (int i = 2; i <= n - 2; ++i) {
      if (fabs((max_angle * i) / (n - 2) - a) <
          fabs((max_angle * min_i) / (n - 2) - a))
        min_i = i;
    }
    out << "2 1 " << 2 + min_i << '\n';
  }
};
void solve(std::istream& in, std::ostream& out) {
  out << std::setprecision(12);
  Solution solution;
  solution.solve(in, out);
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  istream& in = cin;
  ostream& out = cout;
  solve(in, out);
  return 0;
}
