#include <bits/stdc++.h>
using namespace std;
int Set(int mask, int pos) { return mask = mask | (1 << pos); }
bool check(int mask, int pos) { return (bool)(mask & (1 << pos)); }
int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  int n;
  double a;
  cin >> n >> a;
  double maxAngle = ((n - 2) * 180) / (double)n;
  double minAngle = maxAngle / (double)(n - 2);
  double temp = 0, Min = 1e10;
  int idx;
  for (int i = 1; i <= n - 2; i++) {
    temp += minAngle;
    if (abs(temp - a) <= Min) {
      Min = abs(temp - a);
      idx = i + 2;
    }
  }
  cout << 2 << " " << 1 << " " << idx << endl;
  return 0;
}
