#include <bits/stdc++.h>
using namespace std;
double n, k;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cin >> n >> k;
  double a = 180;
  a /= n;
  int x = round(k / a);
  if (x) {
    if (x >= n - 1) {
      x = n - 2;
    }
  } else {
    x++;
  }
  std::cout << 1 << " " << 2 << " " << n + 1 - x << std::endl;
}
