#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, a;
  cin >> n >> a;
  long long allang = (n - 3) * 180;
  long long minimum = 1e14;
  long long ans = 0;
  for (int i = 1; i < n - 1; i++) {
    if (minimum > abs((i * 180) - (n * a))) {
      ans = i;
      minimum = abs((i * 180) - (n * a));
    }
  }
  cout << "2 1 " << ans + 2;
}
