#include<stdio.h>
#define A 0.95
#define B 0.90
#define C 0.85
#define D 0.80
int main()
{
double x;
while (scanf("%lf", &x) != EOF)
{
if (x >= 5000)
printf("discount=%g,pay=%g\n", D, x*D);
else if (x >= 3000)
printf("discount=%g,pay=%g\n", C, x*C);
...