-
Notifications
You must be signed in to change notification settings - Fork 0
/
A.cpp
45 lines (45 loc) · 906 Bytes
/
A.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#include<stdio.h>
int main()
{
long long int t,x,y,z,a,b,c;
scanf("%lld",&t);
while(t--)
{
scanf("%lld%lld%lld",&x,&y,&z);
if(x==y && y==z)
{
printf("YES\n");
a=x;
b=x;
c=x;
printf("%lld %lld %lld\n",a,b,c);
}
else if(x==y && x>z)
{
printf("YES\n");
a=z;
b=z;
c=x;
printf("%lld %lld %lld\n",a,b,c);
}
else if(x==z && x>y)
{
printf("YES\n");
a=y;
b=y;
c=x;
printf("%lld %lld %lld\n",a,b,c);
}
else if(y==z && y>x)
{
printf("YES\n");
a=x;
b=x;
c=y;
printf("%lld %lld %lld\n",a,b,c);
}
else
printf("NO\n");
}
return 0;
}