#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  double m;
  cin >> n >> m;
  double f = 180 / double(n);
  int i = 0;
  double ans = 100000000;
  int a = 1;
  while (i < n - 2) {
    i++;
    if (abs(f * double(i) - m) < ans) {
      ans = abs(f * double(i) - m);
      a = i;
    }
  }
  cout << n << " " << n - 1 << " " << a;
  return 0;
}
