Kiểm tra tam giác cân

View as PDF

Submit solution

Points: 0.10
Time limit: 0.1s
Memory limit: 64M
Input: stdin
Output: stdout

Author:
Problem type

B và H đang có n viên bi. Là một người yêu hình học, B đã thử thách H rằng : Liệu rằng với chính xác n viên bi hiện có , H có thể sắp xếp chúng thành một tam giác vuông cân hay không ( Biết rằng tam giác vuông cân là tam giác vuông có hai cạnh góc vuông bằng nhau ) . H ngồi cả một buổi chiều vẫn không thể sắp xếp được. Bạn hãy giúp H nhé.

ảnh minh họa

INPUT

Dòng đầu tiên chứa số nguyên n là số viên bi (~1 \leq n \leq 10^{18}~)

OUTPUT

Nếu từ n viên bi có thể xếp thành tam giác vuông cân in ra YES, nếu không in ra NO (YES và NO phải viết hoa)

SAMPLE INPUT 1

3

SAMPLE OUTPUT 1

YES

SAMPLE INPUT 2

2

SAMPLE OUTPUT 2

NO

Comments

Please read the guidelines before commenting.



  • 0
    leminhhoang  commented on May 8, 2026, 3:23 p.m.

    omg ăn cứt bò vị trà sữa


  • -1
    ngocphatvu  commented on April 5, 2026, 1:07 p.m.

    677777777777777777777777777777777++++ +++++++++++++ GR GRW+ G+R+ +GR +G R+AWR+9G GWG BSHZBVHYBDSFUIBGSUOGSUOGDSBUGSOU


  • -2
    cukhoaimat  commented on March 25, 2026, 10:28 a.m.

    khuê ê mày đi ăn c#t à


  • -2
    cukhoaimat  commented on Oct. 20, 2025, 1:38 p.m.

    wtf


  • -2
    nguyentatkhue  commented on Oct. 20, 2025, 1:37 p.m.

    ai nói tiếp lám c ho


  • -2
    cukhoaimat  commented on Oct. 20, 2025, 1:37 p.m.

    sao mày biết tên tao


  • 0
    nguyentatkhue  commented on Oct. 20, 2025, 1:36 p.m.

    nguyên beo hehehehehehehehehehehheehehehheheheheheheheehehehehheheheheehheeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee


  • -2
    cukhoaimat  commented on Oct. 20, 2025, 1:31 p.m.

    bố mày


  • 0
    nguyentatkhue  commented on Oct. 20, 2025, 1:31 p.m.

    ê ai on trả lời


  • -2
    cukhoaimat  commented on Oct. 20, 2025, 1:29 p.m. edited

    mày chơi plant đi


  • 0
    nguyentatkhue  commented on Oct. 20, 2025, 1:29 p.m.

    ko


  • -2
    cukhoaimat  commented on Oct. 20, 2025, 1:29 p.m.

    mày chơi plant ko


  • -2
    cukhoaimat  commented on Oct. 20, 2025, 1:27 p.m.

    damate


  • -2
    cukhoaimat  commented on Oct. 20, 2025, 1:27 p.m.

    bú cu


  • -2
    cukhoaimat  commented on Oct. 20, 2025, 1:26 p.m.

    gay


  • -2
    cukhoaimat  commented on Oct. 20, 2025, 1:02 p.m. edited

    I am steve


  • 2
    truonggiangtmn  commented on Oct. 13, 2025, 11:48 a.m.

    có làm thì mới có ăn nha m!


  • -1
    quanglucky  commented on Oct. 12, 2025, 11:13 a.m.

    ai biết làm ko cho xin code c++