#include <cmath>
#include <iostream>
using namespace std;
double f(const double x, const double y) {
static constexpr auto pi = 3.1415926535897932;
const auto n = sqrt((pow(sin(x), 2) + 3.0 * y) * (pow(sin(x / pi), 2) + pow(y, 2)));
const auto d = sqrt(pow(x, 2) + pow(y, 2)) * pow((exp(x) + exp(-y)), 2);
return n / d;
}
double y(const double a, const double b) {
const auto x1 = 2.0 * a + b;
const auto y1 = a * b + 1.0;
const auto x2 = 3.0 * a + pow(b, 2);
const auto y2 = a + 2.0 * b;
return f(x1, y1) + f(x2, y2);
}
int main() {
cout.setf(ios::fixed);
cout.precision(4);
cout << "y(0.5, 0.5) = " << y(0.5, 0.5) << '\n';
cout << "y(0.5, 1.0) = " << y(0.5, 1.0) << '\n';
cout << "y(1.0, 0.5) = " << y(1.0, 0.5) << '\n';
cout << "y(1.0, 1.0) = " << y(1.0, 1.0) << '\n';
}