#include <bits/stdc++.h>
using namespace std;
int main() {
  double n, a, in, temp, min = DBL_MAX, small;
  int ans, count = 0;
  cin >> n >> a;
  small = 180 / n;
  temp = small;
  while (count < (n - 2)) {
    if (abs(a - temp) < min) {
      min = abs(a - temp);
      ans = count;
    }
    count++;
    temp += small;
  }
  cout << 1 << " " << 2 << " " << n - ans << endl;
}
