forked from iotaledger/iota.go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sign_test.go
229 lines (199 loc) · 54.7 KB
/
sign_test.go
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
/*
MIT License
Copyright (c) 2016 Sascha Hanse
Copyright (c) 2017 Shinya Yagyu
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
package giota
import (
"testing"
)
func TestNewKey(t *testing.T) {
keyTrits := Trits{-1, 1, 1, 1, 0, 0, 1, 0, 1, 0, 1, -1, 0, 1, 1, 1, 1, 1, -1, 1, 1, 1, 0, 1, 1, 0, 1, -1, 1, 1, 1, -1, -1, -1, -1, 0, -1, -1, 0, 1, 1, -1, -1, -1, -1, 1, 1, 0, 1, 0, 1, 1, 1, -1, -1, -1, 0, 0, 0, -1, 0, 0, 1, -1, 1, 0, 0, 1, -1, -1, -1, 1, 1, -1, 0, -1, 1, 0, 1, 1, 1, 1, 1, 1, -1, 0, 1, 1, -1, 1, 1, 0, 0, -1, 1, 0, 1, 0, 1, 0, -1, 0, 0, -1, -1, -1, 0, 0, -1, 1, 1, 1, -1, 0, 0, 1, 1, -1, 0, 0, 0, -1, 0, 0, 1, -1, 1, 0, 0, 0, -1, 0, -1, -1, 0, 0, 0, 1, -1, 1, -1, -1, -1, -1, -1, 1, -1, 0, 1, -1, -1, -1, -1, 1, 1, 0, 1, -1, 0, 0, -1, 0, -1, -1, 0, 0, -1, -1, 1, 1, -1, 0, -1, 0, 1, 1, -1, 0, 0, -1, 1, 0, -1, 1, 0, -1, -1, 0, -1, 0, 1, 1, -1, 0, 0, 0, 1, 1, 0, 1, 1, 1, 1, 0, 1, 0, -1, 1, 0, 1, 1, 1, 0, 1, 1, -1, 0, -1, 0, 1, 0, 0, -1, 0, 0, -1, 0, -1, 0, 0, 1, -1, 0, 0, 1, -1, 0, -1, -1, 1, -1, 0, 0, 1, -1, 0, 1, 1, -1, 0, -1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, -1, -1, 1, 0, 1, 0, 1, -1, -1, 1, 0, 1, 1, -1, 1, 1, 0, 1, 1, 1, -1, -1, -1, 0, 1, 0, 0, -1, 1, -1, -1, 0, 1, 0, 1, 0, 1, 1, 0, 0, 1, 0, -1, 0, 0, 1, 1, -1, 1, 1, 0, 1, -1, 0, -1, -1, 1, -1, 1, -1, -1, 0, 0, 1, 0, 0, -1, 0, 0, -1, 1, 0, -1, -1, 0, 0, -1, 1, -1, 0, -1, 0, 0, -1, 1, 1, 0, 1, 0, 0, -1, 0, -1, 0, -1, -1, 1, -1, -1, 1, 1, -1, 1, 0, 1, 1, -1, 1, 1, 1, 0, 1, 0, 1, 1, -1, 0, 1, 0, 0, 0, 1, -1, -1, 0, -1, 1, 0, 1, 1, 1, 1, 0, -1, 1, -1, -1, -1, 0, -1, -1, 1, 0, -1, -1, 0, 0, 0, 1, 0, 0, -1, 0, -1, -1, 1, 0, -1, 1, 0, 1, -1, 0, -1, 0, -1, -1, 0, -1, -1, 0, -1, 0, 0, 0, 0, 1, 1, -1, 0, 1, -1, 1, 0, 0, 1, 0, 1, -1, 1, 0, -1, -1, 1, -1, 1, -1, 0, 1, -1, 1, 1, -1, 0, 0, 0, 0, 1, -1, 1, -1, 1, 1, 1, -1, 0, 1, 0, 1, 0, -1, 1, 1, -1, 0, 0, -1, 1, 0, 1, -1, 0, -1, -1, 1, 1, -1, 0, 1, 0, -1, 0, -1, 0, -1, -1, 1, 1, -1, 0, 0, 0, 0, 1, 1, 0, -1, 1, 0, 1, 0, -1, -1, 1, 1, 0, 0, -1, -1, 1, 0, 1, 1, -1, 0, 1, 1, 0, 1, -1, -1, 0, 1, 1, 1, 0, -1, 1, 0, 0, 0, 0, -1, 1, -1, -1, 0, 1, -1, -1, 1, 1, -1, 0, 0, -1, 1, 0, -1, -1, 1, -1, 0, 1, -1, 0, 0, -1, -1, -1, 1, 1, 1, 1, 1, 0, -1, -1, -1, 1, 1, 0, 0, 1, 0, -1, -1, -1, -1, -1, 0, 0, -1, 0, 0, 0, 1, -1, 0, 1, 0, 0, 0, -1, -1, 1, -1, 0, 1, -1, -1, 1, -1, 1, 1, 0, 0, -1, 0, -1, 0, 1, 0, -1, 1, 0, 0, -1, 1, 0, 1, 0, -1, 0, -1, 0, 0, 0, 0, -1, -1, 0, -1, 1, 0, 1, -1, 1, -1, 0, 1, 1, 1, 0, 1, 0, 0, -1, 0, 1, 1, -1, 0, 0, 1, 1, 0, -1, 0, -1, -1, 0, 1, -1, 0, -1, 0, -1, -1, 1, 0, 0, -1, 1, 1, -1, 0, -1, 1, 1, -1, 0, 0, -1, -1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1, -1, 0, -1, 1, 0, -1, 1, 1, 1, 0, 0, -1, 0, -1, -1, 0, 1, 1, 0, 1, -1, 0, 0, -1, 0, 0, -1, 0, 1, 0, 1, 0, -1, -1, -1, 1, 1, 0, 1, 0, 1, -1, -1, 0, 0, 1, 0, 1, 0, 0, -1, 0, -1, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0, -1, -1, -1, -1, 0, 0, 1, -1, -1, 1, -1, 0, -1, 1, -1, -1, -1, 0, 0, 0, 1, 1, 1, -1, 1, -1, 1, -1, 1, 0, 0, 0, 1, -1, 1, -1, -1, 0, -1, -1, 0, 1, 1, 1, 0, 0, 1, -1, 0, -1, 1, -1, 1, 1, 0, 1, 1, -1, 0, 1, 0, 1, 1, 1, 0, 0, -1, 0, -1, 0, 0, -1, -1, 1, 0, -1, 0, 1, 0, -1, 1, -1, -1, 0, -1, 1, 0, -1, -1, 0, 1, 0, -1, -1, 1, 1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, -1, 0, 0, -1, 1, -1, 0, -1, 1, 0, 0, -1, 1, -1, -1, -1, -1, -1, -1, 1, 1, 1, -1, 1, 1, 1, -1, -1, 0, 0, -1, -1, 1, 1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1, 1, 1, 0, 1, 0, 1, 1, -1, -1, -1, 0, 1, 0, 0, 1, -1, -1, 0, 1, 0, 0, 0, 0, -1, 1, -1, 1, -1, 0, 0, 0, -1, 0, -1, -1, 0, 0, -1, 1, 1, 1, 0, 1, -1, -1, 0, 1, -1, 0, 0, -1, 0, -1, -1, -1, -1, 0, 0, 0, 1, 1, -1, -1, 1, 0, 1, 1, -1, 1, 0, 0, 1, 0, 1, 0, -1, 1, -1, 0, 0, 1, -1, -1, 0, 0, 1, 1, 0, -1, -1, 0, 1, 1, -1, 0, 0, -1, -1, 0, 0, 0, 0, 1, -1, -1, -1, 0, 1, 0, 1, -1, 0, -1, 0, 1, 1, 1, 1, -1, 1, 1, -1, 0, -1, 1, 0, -1, 0, 1, -1, -1, -1, 0, 1, 1, 1, 0, 1, -1, 1, 1, 1, 0, 0, 0, 1, 1, -1, -1, 0, 0, 1, 0, 0, -1, 0, 1, -1, -1, 0, -1, -1, 0, -1, -1, 0, -1, -1, 0, 1, 1, 1, -1, -1, 1, 0, -1, 1, -1, 1, -1, -1, 0, 1, -1, 1, 1, 1, 0, 0, -1, -1, 1, -1, 0, 1, -1, 0, 0, -1, 0, -1, 0, -1, 0, 1, -1, -1, -1, 1, -1, 0, 0, -1, 0, 1, -1, -1, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, -1, -1, 1, -1, -1, 0, -1, -1, 1, -1, 1, 0, 1, 1, 0, 1, 1, 0, 0, -1, -1, 1, 0, 1, 0, 1, -1, 1, 1, -1, -1, 1, -1, -1, -1, 0, -1, 0, 0, 0, 1, 0, 1, 0, 1, -1, 0, 0, 0, 0, 1, 0, -1, 0, 0, 1, -1, -1, 0, 0, 1, 0, 0, 0, -1, 1, 1, -1, -1, 0, -1, 0, -1, 1, -1, 0, 0, -1, 0, 0, 0, -1, -1, 0, 1, -1, -1, 0, -1, -1, 1, 0, 1, -1, 1, 0, 1, 0, 1, 1, -1, 1, -1, -1, 1, -1, -1, 0, 0, 1, -1, 0, 1, 0, -1, 1, 1, -1, 1, 0, 1, -1, 1, 0, -1, 0, 1, 1, 1, -1, -1, 1, 0, 0, -1, 0, 0, -1, 0, -1, -1, 1, 0, -1, 1, -1, 0, -1, -1, 0, 1, 1, 1, 0, 1, -1, 1, 1, -1, 1, 0, -1, 1, 0, 1, 0, -1, 0, -1, -1, 0, -1, -1, -1, -1, -1, -1, -1, -1, 1, 1, 1, 1, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, -1, -1, 0, 0, 1, 1, 0, 0, -1, 1, -1, -1, 1, -1, 1, 0, 1, 1, 0, -1, 1, 0, 1, 1, 0, 1, 1, 0, -1, 0, 0, -1, -1, -1, -1, -1, 0, 1, -1, 0, 1, 1, 1, 0, 1, -1, 1, 1, 0, 1, 1, 0, -1, 1, 0, 1, -1, 0, -1, 1, 0, -1, -1, 0, -1, 1, 0, 0, -1, 0, 1, 0, 0, -1, 0, 1, 0, 0, 0, -1, 1, 0, -1, -1, -1, 0, -1, 1, 0, 1, 0, -1, -1, 0, 1, 0, 0, 0, 0, 0, 1, -1, 1, 0, 1, 1, 1, -1, -1, -1, 0, 0, 0, -1, 1, 0, -1, 1, -1, -1, 0, 1, 0, 0, 0, 1, -1, -1, 1, 1, 0, 0, -1, 1, 1, 1, 1, 1, 1, -1, -1, 1, -1, -1, 0, -1, -1, 1, -1, -1, -1, 1, -1, -1, 0, 0, 1, -1, 1, 1, -1, -1, -1, 1, 0, 1, -1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, -1, 1, -1, -1, 0, -1, 1, 1, 0, 0, 1, 1, -1, 1, -1, 1, 0, 0, -1, 0, 1, 0, -1, -1, 1, 1, 0, 1, -1, -1, 1, 1, 1, 0, 1, 1, 1, 0, 1, -1, 0, 1, -1, 0, 0, -1, 0, 1, 0, -1, 1, 0, -1, 1, 1, 0, 0, -1, 1, -1, 1, -1, 0, -1, 1, 1, 1, 1, 0, 1, 0, -1, 1, 0, 0, -1, -1, -1, -1, 1, 0, 1, -1, 0, -1, 0, 1, -1, 1, -1, 0, -1, -1, -1, 0, 1, 1, 0, 1, 1, -1, -1, -1, -1, 1, 1, 0, 0, 1, 1, 1, -1, 0, 0, -1, 0, 0, -1, 0, 1, -1, 1, 0, 0, 0, -1, 1, -1, 1, -1, 1, 0, 0, -1, -1, 1, 0, 0, 0, 0, -1, 0, -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, 0, -1, -1, 0, -1, 1, 1, -1, 0, 1, 1, 0, 0, -1, -1, 0, 0, 1, 0, 1, 1, -1, -1, -1, 0, -1, -1, 1, 0, 1, -1, -1, 0, 1, 1, -1, 0, -1, -1, 1, 0, -1, 1, 1, -1, 0, -1, 1, 0, -1, 1, 1, -1, -1, 1, 0, 0, -1, 1, 1, -1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -1, 0, -1, -1, 0, 0, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 0, 1, -1, -1, 0, 0, 0, -1, 0, 0, 1, -1, 0, 1, 0, -1, -1, 1, -1, -1, -1, 0, 0, 0, 0, -1, -1, -1, 1, -1, -1, 1, 0, 0, 1, 1, -1, 0, -1, -1, 1, 0, -1, -1, -1, -1, -1, -1, 1, 1, -1, 1, -1, -1, 1, 0, 1, 1, 1, -1, 0, -1, 1, 1, 0, 0, -1, -1, 0, 1, -1, -1, -1, 1, -1, 1, -1, 0, 0, -1, 1, 0, 0, 1, -1, 0, 1, 0, 0, 1, 1, 0, 1, 0, -1, 1, 0, 1, -1, 0, 1, -1, -1, -1, -1, 1, -1, 1, -1, 0, 1, -1, 1, 1, 0, 0, 1, 0, 1, -1, 1, 0, -1, -1, -1, 1, 1, -1, 1, 0, -1, -1, -1, 0, 1, -1, 0, -1, 0, 0, 1, 0, 0, 0, 0, -1, -1, 0, 0, -1, -1, -1, 1, 1, 0, 0, 1, 1, 0, -1, 0, 0, 0, 1, 1, 0, -1, -1, 0, -1, -1, -1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, -1, 1, 0, -1, 0, -1, 0, 0, -1, 0, 1, -1, 1, -1, 1, -1, 1, 0, 0, -1, 1, 1, 0, -1, 0, 0, 0, 1, 0, 0, 1, 0, -1, 0, 0, 0, 0, -1, 1, 0, 1, 1, -1, 0, 1, 1, 0, -1, 0, 0, -1, -1, 1, -1, 1, 1, -1, -1, 0, 1, 0, -1, 0, 1, -1, -1, 0, 0, -1, 0, 1, 0, 1, 1, 1, 0, -1, 0, 1, 1, 0, -1, 1, -1, 1, -1, 0, 1, 1, 0, -1, 0, 1, 1, 0, -1, 0, -1, -1, -1, 1, 0, 1, 1, -1, 1, 0, 0, 1, -1, -1, 0, 0, -1, 1, 0, 1, 0, 1, 0, 0, -1, 1, -1, -1, -1, 1, -1, 1, -1, 1, 0, 1, 1, 0, 1, 0, -1, 0, 0, 1, 1, 0, 0, 0, 1, -1, -1, 0, -1, 1, -1, -1, 0, 1, -1, -1, -1, 1, -1, -1, -1, -1, 0, 1, 1, 1, -1, 1, 1, 0, 0, 1, 1, 1, -1, -1, 1, -1, 0, 1, -1, -1, 1, 1, 0, 1, 1, 1, 1, 1, 1, -1, -1, -1, 1, -1, -1, 0, 0, 1, 1, -1, 0, 0, -1, 0, 1, -1, 1, -1, 1, 1, 0, 1, 0, -1, 1, 1, 0, -1, 0, 1, -1, 1, -1, -1, -1, 1, 1, 0, -1, -1, 0, 1, 0, -1, 1, 0, 1, -1, 0, 1, 0, 1, 1, -1, -1, 1, -1, 0, 0, -1, 0, -1, 0, 1, 0, 1, 0, 1, 1, -1, -1, 0, 1, -1, -1, 1, -1, -1, 0, 0, 1, 0, -1, 1, 1, 0, -1, 0, 1, 1, -1, 0, -1, -1, 1, 1, -1, 0, -1, -1, 1, 0, 0, 1, 1, 0, -1, 1, 1, 1, 0, 1, -1, -1, 1, 1, 1, 0, 0, -1, 0, -1, 0, -1, -1, -1, 1, -1, 1, 1, -1, 1, -1, 1, 0, 1, 0, -1, 1, 1, 0, 0, 0, 1, 0, 1, -1, -1, 0, 0, 1, 0, -1, 0, 1, 0, 1, 0, 0, 1, 1, 1, -1, 1, 1, 0, -1, 1, 1, -1, 1, 1, 0, 1, -1, 0, 1, 0, 1, 1, -1, 0, -1, -1, 0, 0, 1, 1, 0, -1, -1, 1, 0, 1, 1, -1, 0, -1, 1, 0, -1, -1, 1, 1, 1, 1, 1, 0, 0, -1, 1, 0, 1, -1, 0, 0, 1, 0, -1, 1, -1, -1, 1, 1, 1, 0, -1, 1, 1, -1, 1, 1, 1, -1, 1, 0, -1, 1, 1, 1, 0, 1, 1, 0, 1, -1, 1, -1, 0, 1, -1, 0, -1, -1, 0, 0, 1, 1, 0, 1, 1, -1, -1, 1, 1, 1, 1, 1, -1, -1, 0, 0, 0, 0, 0, 0, -1, 0, 0, 1, 1, 1, 1, 0, 1, -1, 1, 1, -1, 0, 1, 0, -1, 1, -1, -1, 1, 1, 1, -1, -1, -1, -1, 0, -1, -1, -1, -1, 1, 1, 0, -1, -1, 1, -1, -1, -1, -1, 1, 0, 1, 1, -1, 0, 1, 1, 0, -1, 1, 1, 1, -1, 1, 0, 0, -1, 1, 1, 1, -1, -1, -1, -1, -1, 1, -1, 0, 1, -1, -1, 0, -1, -1, -1, -1, 0, 0, 0, 1, 0, 1, -1, -1, 0, 0, 1, 0, 0, 1, -1, 0, 1, 1, -1, 0, 1, -1, 0, -1, 1, 1, -1, 1, 1, 1, 0, 0, 1, 0, -1, 1, 1, 0, -1, -1, -1, 0, -1, 0, 1, 1, -1, 1, -1, 0, 1, -1, -1, 1, 0, -1, -1, 1, 0, -1, 0, 0, -1, -1, 0, 1, 0, -1, 0, 1, 1, 1, 0, 1, 0, -1, 0, -1, 1, 1, 0, -1, 0, 0, 1, 0, 0, 0, -1, 1, -1, 0, -1, 0, -1, -1, -1, -1, 0, 1, 1, 0, 1, -1, 1, -1, 0, 1, 0, -1, -1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 1, -1, 0, 0, 0, 1, -1, 0, 1, -1, 1, -1, 0, -1, 1, 0, -1, -1, 1, 0, 1, 0, 0, 1, 1, -1, 0, 0, -1, 0, 1, 1, 0, 0, 1, 0, 1, 1, -1, -1, 0, 0, -1, 1, 1, 1, 1, -1, -1, 0, 0, 1, 0, 1, -1, -1, -1, 0, 1, 0, 1, -1, 0, 0, 0, -1, 1, -1, -1, 1, 0, -1, 1, -1, 0, -1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0, -1, -1, 0, 0, 1, 1, 0, -1, -1, 1, -1, 1, 0, 1, 0, -1, 1, -1, -1, 1, 1, 0, 0, -1, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, -1, 0, -1, 1, 0, -1, -1, 0, -1, 1, 1, 1, 1, 1, -1, -1, 1, -1, 1, -1, 1, 0, 0, 0, -1, 0, -1, 1, 1, 0, -1, 0, 1, -1, -1, 0, 1, -1, -1, -1, 0, 0, -1, 1, -1, 1, -1, 0, -1, 0, 0, 0, -1, 0, 0, 0, 1, 1, 0, 1, 0, 0, 1, -1, 0, 0, 0, 1, -1, -1, -1, 0, -1, 0, 1, 0, 1, -1, 0, 0, 0, -1, -1, -1, 1, -1, -1, 1, 0, 1, 1, -1, 1, 0, -1, 0, 0, 1, -1, -1, -1, 0, 0, 1, 0, 0, 1, -1, 1, 1, 1, 1, -1, -1, -1, 1, 0, -1, 0, -1, 1, 0, 1, 0, 1, 1, -1, -1, -1, 1, 0, 0, 0, 1, 0, 1, 0, 1, -1, -1, 1, 1, 0, 0, -1, -1, -1, -1, 1, 1, 0, 1, 0, -1, 0, -1, 0, 1, 0, -1, 1, 1, -1, -1, 1, 0, 0, 0, -1, 0, 0, -1, -1, -1, 1, -1, 1, -1, 0, 1, -1, 1, 0, 0, 1, -1, -1, 1, -1, 1, 1, -1, 0, -1, -1, -1, -1, -1, 0, 0, 0, -1, -1, 1, 1, -1, 0, -1, -1, 0, 1, 0, -1, 0, 1, 1, 0, -1, 1, -1, 0, 0, 0, -1, -1, -1, -1, 0, -1, -1, 0, -1, 0, 0, 0, 1, -1, 1, 1, 0, 1, -1, 1, 1, -1, -1, 1, 1, -1, 0, 1, -1, 0, -1, -1, -1, 0, 1, -1, 1, 0, 0, 1, -1, 1, 1, -1, -1, -1, 0, 0, -1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, -1, 1, 1, -1, 1, 1, -1, 0, 0, 1, 0, 0, -1, -1, 1, 1, 0, 0, -1, -1, -1, 1, 1, -1, -1, -1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, -1, 0, -1, -1, 1, 1, 0, -1, 1, -1, 1, -1, 0, 0, -1, 0, -1, 1, -1, 0, 0, 1, 1, -1, 0, -1, 1, -1, 0, 1, -1, 0, 0, 0, 0, 1, -1, -1, 1, 0, 0, 1, 1, 1, 0, -1, -1, 1, 1, 1, -1, -1, 0, 0, 1, 0, 1, 0, -1, 0, 1, -1, 1, 1, 0, -1, 0, 0, 1, 0, 0, 0, 0, -1, 0, 1, -1, 1, 1, 1, -1, 1, -1, 0, 1, 1, -1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, -1, 1, -1, -1, 1, 1, 1, 1, -1, 0, -1, -1, -1, -1, 0, 0, 0, 1, 0, 1, -1, 0, -1, -1, 0, 0, -1, -1, 1, 0, 0, 0, -1, -1, -1, 1, -1, -1, 1, 0, 1, 1, 0, 1, -1, 1, 0, 0, -1, 1, -1, -1, -1, 0, -1, 0, 1, 1, 0, 1, 0, -1, 0, 1, 1, -1, 0, 0, 0, 0, 0, 0, 1, 0, 0, -1, 1, -1, 0, 0, 1, 0, 1, -1, 1, -1, 0, 0, -1, 0, 0, -1, 1, 1, -1, -1, 0, 0, -1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, -1, 0, -1, 1, 1, 1, 1, 0, -1, 0, 0, -1, -1, -1, 1, -1, 0, 0, 0, 0, -1, 0, 1, 0, 1, 1, -1, 1, -1, 1, 0, -1, 0, 0, 1, 1, 0, 0, -1, 0, 0, -1, 0, 0, 0, 0, 0, -1, -1, 1, 0, -1, -1, 1, 1, -1, 0, 1, 0, 1, 0, 0, 1, 1, 1, -1, 0, 1, -1, 0, 0, 0, -1, -1, 1, -1, 0, 1, -1, -1, 1, -1, 1, -1, 0, 0, -1, 0, 1, 0, 1, -1, 0, -1, -1, -1, 1, -1, 0, 1, -1, 0, 1, -1, 1, 1, -1, -1, -1, 1, -1, -1, -1, -1, 0, 0, 0, 0, 1, 0, -1, 1, -1, -1, 1, 1, 1, -1, -1, 1, 0, 1, -1, -1, 0, 0, 1, 1, 1, 1, -1, -1, 0, -1, 1, 1, -1, 0, -1, 1, -1, 1, -1, 1, -1, -1, -1, 1, 0, -1, -1, 1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, -1, 1, 0, -1, 0, 1, 0, 0, -1, -1, 0, 1, -1, -1, 0, 0, 0, 0, -1, 0, -1, 1, 0, 0, -1, -1, 1, 0, -1, 0, 0, -1, 0, 1, 0, -1, 0, 0, -1, -1, 0, 1, -1, 1, 1, 1, 1, 1, -1, -1, -1, 0, 0, 0, 1, 1, -1, 0, 1, -1, 1, 0, 0, 1, -1, 0, 0, 0, 0, 1, 0, 0, -1, 0, 1, 1, 1, 1, -1, 0, 1, 0, 0, -1, 0, 0, -1, -1, 1, 0, 1, 1, 0, 0, 0, -1, -1, -1, 1, 0, -1, -1, -1, 1, 0, 0, 0, 1, 1, 0, 1, -1, -1, -1, 1, 0, -1, 0, 0, -1, 1, 0, 0, -1, 1, 0, 0, 1, 0, -1, 0, -1, 0, -1, 0, 0, 0, 0, -1, 0, 0, -1, -1, 0, 1, 1, -1, -1, 1, 0, -1, 1, 1, 1, 0, 1, 1, 0, -1, 1, 0, -1, 1, 0, -1, 1, -1, 0, 0, 0, 1, -1, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 1, -1, -1, 0, -1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, -1, 1, -1, 1, -1, -1, 0, -1, 0, 0, 1, 0, -1, -1, 0, 0, -1, 1, -1, 1, 0, -1, -1, -1, 1, 0, 0, 1, 0, -1, -1, 0, 1, 1, 0, 1, -1, -1, -1, 1, 1, 1, -1, 0, -1, 1, -1, -1, 0, 0, -1, 0, 1, 1, 1, -1, 0, -1, -1, -1, -1, 0, 1, -1, 0, 1, -1, 0, 0, 1, 1, 0, -1, 0, -1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, 1, 1, -1, -1, 0, 0, 0, -1, 0, -1, 0, -1, 1, 1, 1, 0, 0, 1, -1, 0, 1, 1, -1, 0, 0, 1, 0, 1, -1, 1, 1, -1, -1, -1, 1, 0, -1, 1, 1, 0, -1, 1, 0, 0, -1, 1, 1, 1, 1, 1, 1, 0, -1, 1, 1, 0, 1, 1, -1, 0, 0, -1, 0, 0, 0, 1, -1, 1, -1, 1, 1, 0, 0, 1, -1, 1, -1, -1, 1, 1, 0, 0, -1, 0, 0, 0, 1, 1, 1, 1, 1, -1, 0, 0, 0, -1, 0, 1, 1, -1, 0, -1, 1, 1, -1, -1, 1, 1, -1, 0, -1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, -1, 0, -1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, -1, -1, 1, -1, 0, 1, 1, -1, -1, -1, 0, 0, 1, -1, -1, -1, -1, 1, -1, 0, -1, -1, -1, 0, -1, 0, -1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, -1, 1, 1, 0, 1, 1, 0, -1, 1, 1, -1, 1, -1, 1, 1, -1, 0, 1, 0, 1, 1, 0, -1, 1, -1, 0, 1, -1, 0, 0, 1, 1, 0, -1, -1, 1, 0, 0, 0, 1, -1, 0, -1, 1, 0, -1, 1, -1, -1, 0, -1, -1, -1, 0, -1, -1, -1, 1, 0, -1, 0, -1, -1, -1, -1, 0, 1, -1, 0, 1, 0, 1, 0, 1, 1, -1, 1, 0, 0, 0, 1, -1, 0, -1, 1, -1, -1, 0, -1, 1, 1, 1, 0, -1, -1, 0, 1, 1, 0, 0, 1, 1, 1, 0, 1, 1, -1, 0, 0, 0, 0, 1, 1, 1, -1, -1, -1, 0, 0, 0, 0, 0, 1, 1, -1, 1, -1, 0, 1, 1, 0, -1, -1, -1, -1, -1, 1, 0, 0, 1, 0, -1, 0, 1, 0, 1, 0, -1, -1, 0, -1, 0, -1, -1, 0, 1, 1, 1, 1, -1, -1, 1, 1, 0, 0, 0, -1, 1, 0, 0, -1, 0, -1, 0, 1, 0, -1, -1, 1, -1, -1, 0, 1, -1, 1, -1, -1, -1, 1, 0, 1, -1, 0, 1, -1, 1, 0, 1, 0, 1, 0, -1, 1, 1, 0, 0, 0, -1, 1, -1, 1, 0, -1, -1, -1, 1, 0, -1, 0, 0, 0, 1, -1, -1, 0, -1, 0, -1, 0, 0, 1, 1, 1, 1, -1, -1, 0, 0, 1, -1, -1, 1, 1, 1, -1, 1, -1, 1, -1, -1, 0, 1, -1, 1, -1, 0, -1, 0, 0, 1, -1, 1, 1, 1, 0, 1, -1, 1, -1, 0, -1, 1, -1, 0, -1, 0, 0, -1, 1, -1, 0, 0, -1, 1, -1, -1, 1, 0, -1, 1, 0, -1, -1, 0, 1, -1, -1, 0, 0, -1, 1, 1, 1, 1, -1, 0, -1, 1, 0, -1, -1, 0, 0, 0, -1, -1, -1, -1, 1, 1, -1, 1, 0, 1, 0, 0, -1, 1, 1, 1, 1, -1, 0, 0, 1, 0, -1, 0, 1, 0, 0, 1, 0, 0, 0, 0, -1, 1, -1, 0, 0, -1, 1, 1, 1, 1, -1, -1, -1, -1, 0, -1, 1, 1, 0, -1, 0, 1, -1, 0, 0, -1, 0, 1, 1, -1, -1, 1, 0, 0, -1, -1, 0, 0, 1, -1, 1, -1, 1, 0, 0, -1, 0, 0, 0, 1, -1, 1, 0, 1, -1, 1, -1, 1, 1, -1, 0, 1, 0, -1, -1, 0, 0, 1, 1, 0, 0, 1, 1, -1, -1, -1, -1, 0, 0, -1, 0, 1, -1, -1, 0, 0, -1, 0, 1, -1, -1, 1, -1, 0, 0, 0, -1, 0, 1, -1, 0, -1, -1, 0, 0, -1, 0, -1, 0, -1, -1, -1, 1, -1, 1, 0, -1, -1, -1, 1, 1, 1, -1, 1, 0, -1, -1, -1, 1, 0, 1, 0, 1, -1, 1, 1, -1, 1, -1, 0, 0, -1, -1, 1, 1, 0, 0, -1, 1, -1, 1, -1, 0, -1, 0, 0, 1, -1, 1, -1, -1, 0, 0, 1, 0, 1, 0, 0, 1, 0, -1, -1, 0, 1, 1, 0, 0, 1, -1, 0, -1, 1, -1, 1, 1, 0, 0, 0, 0, 1, 1, -1, 1, -1, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 1, 1, 1, 0, 0, 1, 0, -1, 0, -1, -1, 0, 1, 0, -1, 1, 1, 1, -1, 0, 0, -1, 1, -1, 1, 0, -1, 1, 1, -1, -1, -1, 1, 1, 0, 1, 0, -1, 1, 1, -1, 0, -1, 1, 0, 1, 0, 0, 0, -1, -1, 0, 0, 1, 0, 1, -1, 0, 1, 1, -1, -1, 1, -1, -1, 1, -1, -1, 1, -1, 1, 1, 0, 0, -1, -1, 1, -1, 0, 1, -1, 0, 1, -1, 1, 1, 1, 0, -1, 0, -1, 0, 1, 1, 1, -1, -1, 0, -1, 0, 0, -1, -1, 1, 1, 0, 1, -1, 1, 0, -1, 1, 0, 0, -1, 0, 0, 0, -1, -1, 0, -1, 1, -1, 0, 1, 1, 0, 1, -1, -1, -1, -1, 0, 1, -1, 0, 0, 0, 0, 1, 0, -1, -1, 0, 1, 1, 0, 0, 0, 1, 0, -1, 0, 0, 0, -1, -1, 1, 0, 0, 1, 1, 1, 0, -1, 1, 1, -1, -1, -1, -1, -1, -1, 0, -1, 1, 0, 1, -1, 1, 1, 0, -1, 1, -1, 0, -1, 1, 1, -1, 1, -1, 0, -1, 0, 1, 1, 1, 0, 1, -1, -1, 0, 0, 1, -1, -1, 1, 0, -1, 1, 1, 0, 1, -1, -1, 0, -1, 0, -1, -1, 0, -1, 0, 0, -1, 1, -1, 1, -1, 0, 1, 1, 0, 1, -1, -1, 1, 1, 1, 1, 0, 1, 1, 0, -1, 1, 0, -1, 0, 0, 0, 1, 1, 1, -1, 1, -1, -1, 1, 1, -1, 1, 1, 1, -1, -1, 0, 1, -1, -1, -1, -1, 1, 0, 0, 0, -1, 1, -1, 1, -1, -1, -1, -1, -1, -1, 0, -1, 0, 0, -1, 0, 1, 0, -1, -1, -1, -1, -1, 1, 0, 1, -1, 0, 0, 1, 0, 1, -1, 0, 1, 1, 0, -1, 1, 0, -1, -1, -1, 1, 1, 0, 0, 1, 1, -1, 0, 1, 1, 0, 1, -1, 1, 0, -1, -1, -1, 1, -1, 1, 1, 0, 1, -1, 0, 0, 0, 1, 1, -1, 1, 1, 0, 0, 0, 1, -1, 1, 1, 0, 1, 0, -1, -1, 0, 0, 1, -1, -1, -1, -1, 1, 1, 1, 0, 0, -1, -1, 0, -1, 0, -1, 1, 1, 1, -1, 1, -1, 1, 0, -1, 1, 1, 0, 1, -1, 0, -1, -1, 1, 0, 0, 0, 0, 0, -1, 0, 1, 0, 1, 1, -1, -1, 0, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, -1, 0, 1, 0, -1, 1, -1, 0, 1, 1, 0, 1, -1, 1, -1, 0, -1, -1, -1, 1, -1, -1, 0, 1, 0, 0, -1, 0, -1, 1, -1, 0, -1, -1, -1, 0, -1, -1, 0, 0, 1, 1, 1, 0, -1, 1, -1, 1, 0, 1, 0, 0, 1, 0, 1, -1, 1, -1, -1, 1, 0, 1, -1, 1, 1, -1, 1, -1, 0, 1, -1, 0, -1, 1, 1, 0, -1, 1, -1, 0, 0, 0, -1, 1, 0, 0, -1, 1, -1, 1, -1, 1, -1, 0, 1, 1, 1, 0, 0, -1, -1, 1, 1, 1, 0, 0, -1, 1, 0, 1, 0, 0, 1, 1, 0, -1, -1, -1, 1, -1, 1, 1, 0, -1, 0, 0, 0, 1, -1, 0, -1, 1, -1, 0, 0, 0, 0, -1, 1, 0, 1, 1, 0, -1, 1, -1, -1, 0, 0, 0, -1, 1, 1, 1, 1, -1, 0, 0, -1, 0, -1, 1, 1, -1, 0, -1, 1, 0, 0, 0, 1, 1, -1, 1, -1, 1, 0, 0, 0, 0, 1, -1, 1, 1, 1, 1, -1, 0, 1, 0, -1, 1, -1, 0, -1, 0, -1, 0, -1, 0, 1, 1, 0, 1, -1, 1, -1, 0, -1, 0, -1, 0, -1, -1, -1, -1, 0, 1, -1, 1, -1, 0, 1, 0, 1, 0, -1, -1, 0, 0, -1, -1, -1, -1, 0, -1, 1, 0, 0, 1, 0, 0, -1, 0, 1, -1, 1, 0, 1, -1, -1, -1, 1, -1, 1, -1, -1, 0, 1, 1, 1, 0, 0, -1, 1, 1, 1, 1, 1, -1, -1, -1, -1, 1, -1, 1, 0, -1, 1, 0, 1, 0, 1, 1, -1, 0, 1, 0, -1, 0, 0, 1, 0, 0, 0, -1, -1, 1, -1, -1, 1, -1, 1, 0, 0, -1, 0, 1, -1, 1, 1, -1, 0, -1, 0, 0, 0, -1, 0, 0, -1, -1, 0, 0, -1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, -1, 1, -1, 0, 1, 0, -1, 0, -1, 0, -1, 0, -1, 1, -1, 0, 1, 1, 0, 0, -1, -1, -1, 1, 0, -1, -1, 0, -1, -1, 0, 0, 0, -1, 0, 1, 0, 0, -1, 0, 0, 1, 0, -1, -1, -1, 1, -1, 1, 0, -1, -1, 1, -1, 0, 0, 1, 0, 1, 1, 1, 1, 0, 0, -1, 0, 1, 0, 0, -1, 0, -1, -1, 1, 1, -1, 0, 0, 0, 0, 1, -1, -1, 1, 1, -1, 0, 1, 0, 0, -1, 0, -1, 0, 0, 1, -1, 0, 1, 1, 1, -1, 0, 0, 1, -1, -1, -1, 0, 0, -1, -1, 0, 0, 1, 0, 0, 0, 0, -1, 1, 0, -1, -1, 0, -1, -1, 1, -1, 1, -1, 1, -1, 0, 0, 1, -1, 1, 0, -1, -1, 1, -1, 0, 1, 1, -1, -1, 1, 0, -1, 0, 0, 0, 1, -1, 0, -1, 1, 1, -1, 0, -1, -1, 0, 1, -1, 1, 1, 1, -1, 0, -1, -1, 0, -1, 0, 1, -1, -1, -1, 0, -1, 1, -1, -1, 1, 1, 1, 0, -1, -1, 0, -1, -1, 1, -1, -1, 1, 0, -1, 1, 0, -1, 0, -1, 0, -1, -1, 1, 1, -1, 0, 0, -1, 0, 1, -1, -1, 1, -1, 0, -1, 0, 1, -1, 0, -1, -1, -1, -1, 0, 0, -1, 1, 0, 1, -1, 0, -1, -1, 0, 1, 1, -1, 1, 1, 0, 1, 0, -1, -1, 0, -1, 0, 0, 0, 0, 0, 1, -1, 0, -1, 0, 1, -1, -1, -1, 1, 1, -1, 1, 1, 0, -1, 0, -1, -1, 1, 1, -1, 0, -1, -1, -1, 0, 0, 0, 1, -1, 0, -1, -1, 1, -1, 1, 0, 0, 1, 1, -1, -1, -1, 1, 1, -1, 0, 0, 1, -1, 0, 0, -1, -1, 0, 1, -1, -1, 0, -1, 1, 0, -1, 1, 1, -1, 0, 1, -1, -1, 1, 0, 0, -1, 0, 0, 0, 1, 0, 0, 1, 0, 1, 1, -1, 0, -1, -1, -1, 1, -1, 0, 1, -1, 0, 0, 1, -1, -1, 1, 0, -1, 1, -1, -1, 1, 1, 1, 1, 0, 1, 1, 1, 0, -1, 1, 1, 0, 0, 1, 0, -1, 1, -1, 1, 0, -1, 0, 0, 0, 0, -1, 1, 1, 0, 0, -1, 0, 0, 0, 1, 0, 1, 1, 1, -1, -1, 1, 0, 0, -1, -1, 0, 0, 0, 1, -1, 0, -1, 1, 0, 1, 0, 1, 0, -1, 1, 1, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, -1, 1, 0, 1, 0, -1, 1, 1, 0, 0, 1, -1, 1, 1, -1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 1, -1, -1, -1, 0, 0, 1, 1, 0, -1, -1, 1, 1, 1, 1, -1, -1, 1, 0, -1, -1, 0, 0, 1, 0, 1, 1, -1, 0, -1, 1, 0, -1, 1, 0, 0, 1, 0, 0, -1, -1, 1, 0, -1, -1, 0, 0, 1, 1, 0, 1, 0, -1, -1, -1, 0, -1, 0, -1, -1, 1, 1, 1, 0, 0, -1, -1, -1, -1, 0, 0, -1, 0, 0, 1, -1, -1, 0, 0, -1, 0, -1, 0, 1, -1, -1, 0, -1, -1, -1, -1, 1, 0, -1, 0, 0, 1, -1, 0, 1, -1, -1, 1, 0, -1, 0, 0, 1, -1, -1, 1, 1, 1, -1, 1, 0, -1, 0, 0, 0, 1, 0, -1, -1, -1, 0, 1, 1, 1, 0, -1, -1, -1, 0, -1, 1, 1, 1, 0, -1, -1, 0, 0, 1, 0, -1, 0, 1, 0, 0, 0, -1, -1, 1, -1, 0, -1, -1, -1, 1, -1, -1, 0, -1, -1, 1, 1, 1, 1, -1, -1, 0, -1, -1, 0, 0, 1, -1, 1, -1, -1, 1, -1, 1, -1, 1, -1, 0, 1, -1, -1, 1, 0, -1, -1, 0, -1, -1, 1, 1, 1, 1, 0, 1, 0, 1, 1, -1, 1, 0, 1, 1, 0, 0, -1, 1, 0, 0, 1, -1, 0, 0, 0, -1, 1, -1, 0, -1, 0, 1, -1, 1, -1, -1, 1, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 1, -1, 1, 0, 0, -1, 1, -1, -1, 1, -1, 0, 0, -1, 0, -1, 0, -1, -1, 0, -1, 0, 0, -1, 1, 1, 1, 1, -1, -1, 0, 0, 0, 0, -1, 0, -1, -1, 0, 0, 0, 1, 1, -1, -1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, -1, 1, -1, -1, 1, -1, 0, 0, -1, -1, 0, 1, 0, -1, 1, 0, -1, 0, 0, -1, 0, 1, -1, 0, 1, -1, 0, 1, 1, 0, 1, -1, 0, -1, 0, 0, -1, -1, 0, 0, 1, 0, -1, 0, 0, -1, -1, -1, -1, 1, 0, 0, 0, 0, -1, -1, 1, -1, 0, 1, -1, 1, 0, -1, -1, 1, -1, 1, -1, 0, 1, -1, 0, -1, 1, 1, 1, 0, 0, 1, 0, -1, 0, 1, -1, 0, 0, -1, 1, 0, -1, 0, -1, 0, -1, 1, 1, -1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, -1, 0, -1, -1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, -1, -1, 1, 0, 1, 1, 1, 0, 0, -1, -1, -1, 0, 0, 1, 1, 0, -1, 1, 0, -1, 0, 1, 1, 0, -1, -1, 0, 0, -1, 0, 1, -1, 1, 0, 1, 0, 1, -1, 1, 1, 1, -1, 1, 0, 0, -1, -1, -1, 1, 1, -1, 1, -1, 0, 1, 0, 0, -1, 1, -1, -1, -1, 1, 1, -1, 1, -1, 1, -1, 1, -1, -1, -1, -1, -1, 0, 0, -1, 1, 1, 0, 0, 1, -1, -1, -1, -1, 0, 1, 1, -1, 1, 1, 0, -1, 1, 1, -1, 1, 1, 1, 0, 0, 0, 1, -1, 1, 1, 1, -1, 1, 0, 1, -1, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, -1, -1, 0, -1, 1, 1, -1, 0, 1, -1, 1, -1, 0, 0, -1, 0, 1, -1, 1, -1, -1, 0, -1, -1, -1, -1, 0, 0, 1, -1, 1, -1, -1, 0, 0, 1, 0, 1, 1, 1, -1, 1, 0, -1, -1, 0, 1, 0, -1, -1, -1, 0, 0, 0, 0, 0, -1, 1, 0, -1, -1, -1, 0, 0, 0, 1, 1, 0, -1, -1, 1, 0, 0, -1, 0, 1, 0, 1, 1, 0, 1, -1, 1, -1, 1, 0, 1, 1, -1, 1, 0, 0, -1, 0, -1, 1, 1, -1, 1, 0, 0, 0, -1, 0, 1, -1, -1, 0, -1, 1, -1, -1, -1, -1, 1, 0, 1, 0, -1, -1, 0, -1, 1, 1, 1, 0, 1, -1, 0, 1, 0, 1, -1, 0, 1, -1, 1, -1, 0, -1, 0, 0, 1, 1, 1, -1, -1, -1, 0, -1, -1, 1, 1, -1, -1, 1, -1, 1, 0, 1, 0, 0, 1, 0, 0, 1, -1, 0, 1, -1, -1, 1, -1, -1, -1, 0, 1, 0, 1, 1, -1, 1, 1, 0, 1, 1, -1, -1, 1, 1, 0, 0, -1, 1, -1, -1, 0, -1, -1, -1, -1, 0, 0, 1, -1, 0, 0, 1, 0, 1, 1, -1, 0, 1, 1, 0, 1, 0, 1, 0, -1, 0, 1, 0, 0, 1, 0, -1, 1, -1, 0, 0, -1, 1, 1, 0, 0, 0, 0, 0, -1, 0, 0, 1, 1, -1, 1, 0, 0, 1, -1, -1, -1, -1, 1, 0, -1, -1, -1, -1, 1, 1, 1, -1, -1, 0, -1, -1, 1, -1, 0, -1, -1, -1, 1, 0, 0, -1, 0, -1, 0, 0, 0, 1, -1, 0, -1, 1, 1, -1, 0, 1, 0, 1, -1, 1, 1, 1, 1, 0, 0, 1, 0, 0, -1, -1, 1, 1, 1, 0, 0, 0, -1, -1, 0, -1, 1, -1, 0, -1, 0, -1, -1, 1, 0, -1, -1, 0, 0, -1, -1, 1, 0, 1, -1, 0, -1, 1, 0, -1, 1, 0, -1, 0, 1, -1, 0, 1, 0, 0, 0, 0, 1, 1, -1, -1, 0, 1, -1, 1, 0, 1, 1, -1, -1, 0, 0, 1, -1, -1, 1, -1, -1, 0, 1, -1, 0, 0, 0, 0, 0, 0, 1, -1, -1, -1, 0, -1, 1, -1, 1, 0, -1, 0, 1, 1, 0, 0, 0, 0, 0, 0, -1, -1, 1, -1, 1, -1, -1, 0, 1, 0, 1, 1, -1, 1, 0, -1, 1, 0, -1, 0, 0, 1, -1, 1, -1, -1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, -1, 1, 0, 0, 1, 1, -1, -1, 0, -1, 0, 1, -1, 1, -1, 0, 0, -1, 1, 0, 0, 1, -1, -1, 1, -1, -1, -1, -1, 0, 0, -1, -1, 0, -1, 0, 0, 1, 1, -1, -1, 1, 0, -1, 1, -1, 1, -1, 1, 1, -1, -1, 1, 1, -1, 1, 0, 0, 0, 1, -1, 1, 1, 0, 0, 0, 1, 0, 1, 0, 1, -1, -1, 1, 0, 0, -1, 0, 0, 1, 0, -1, -1, -1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, -1, -1, 0, -1, 0, 0, 1, -1, 1, -1, -1, 1, -1, -1, -1, 1, -1, 0, 0, 1, -1, 1, 1, 0, 0, 1, 1, -1, 1, 0, 1, 1, 1, -1, 1, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, -1, 1, 0, -1, 1, 0, 1, -1, 1, 0, -1, 1, -1, 0, -1, -1, -1, -1, -1, -1, -1, 1, -1, 0, 0, 0, 0, 0, -1, 1, 1, -1, 1, 1, 1, -1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, -1, -1, 1, -1, 0, 1, -1, 0, 1, 1, -1, 1, -1, 0, 1, 1, -1, 0, -1, -1, 1, -1, 1, -1, -1, -1, 0, -1, -1, -1, 1, -1, -1, 0, 1, 1, 0, -1, -1, 0, -1, 1, -1, 0, -1, -1, 1, -1, 0, -1, 1, 0, 1, 1, -1, -1, 0, -1, -1, 0, -1, 1, 1, 0, 0, 0, -1, 0, 1, 1, -1, 0, -1, 1, -1, -1, -1, 0, -1, -1, 0, -1, 0, -1, 1, -1, -1, -1, -1, -1, 0, 1, -1, -1, 0, -1, 1, 0, 1, 0, -1, -1, 1, -1, 1, 1, -1, 0, -1, -1, -1, -1, 0, 0, 0, 0, 0, 1, 0, 0, -1, 0, 1, 0, 1, 0, 1, 0, 0, -1, -1, 1, 1, 1, 0, 1, 1, 1, 0, -1, -1, 1, 1, 1, 1, 1, -1, 0, -1, 1, -1, 0, 0, 0, -1, 1, -1, 0, 0, 0, 0, -1, 0, 1, 1, 1, 0, 1, 0, -1, 0, 0, 1, -1, 1, 0, 1, 0, 0, -1, 1, 1, -1, -1, 0, 0, 1, -1, 0, 0, 1, 1, -1, -1, 0, 0, -1, 1, -1, -1, 1, 0, 1, -1, -1, 1, 1, 0, 0, 1, 0, 1, 1, 1, 1, 0, 1, -1, -1, -1, -1, 0, 0, 1, -1, -1, -1, 0, 1, 1, -1, 0, 0, 0, 0, 0, -1, 1, -1, -1, -1, 0, 1, 0, -1, 0, 0, 0, 1, 1, 0, -1, -1, 0, 0, 0, -1, -1, -1, 1, 0, -1, 0, 1, 0, -1, -1, -1, -1, -1, 1, 0, 0, 1, -1, 0, -1, 1, -1, 0, -1, 0, 1, -1, 1, -1, 1, 0, 0, -1, -1, 1, -1, -1, -1, 1, 1, 1, -1, 0, -1, 0, -1, -1, -1, -1, 0, -1, 1, 0, 1, 1, 1, -1, -1, -1, 1, 0, 0, -1, -1, 1, 1, 1, -1, -1, 1, 1, 0, -1, 1, 0, 1, -1, 1, 1, 0, -1, 0, 1, -1, 0, 1, -1, 0, 0, -1, -1, 0, 0, -1, 0, -1, 0, 1, -1, 1, 0, 0, 0, 0, 1, 1, -1, 1, 1, 0, 0, 1, -1, 1, -1, -1, 1, 1, 1, 0, 0, -1, 0, 0, 1, 0, -1, -1, 1, 0, 1, 0, 0, 1, -1, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, -1, -1, 0, -1, 1, 0, 0, 0, 1, 0, -1, 1, -1, -1, -1, -1, 1, 1, -1, 1, 1, 1, 0, 0, 1, 1, 1, 0, -1, 0, 1, 1, 1, 1, 1, 0, -1, 0, 1, -1, -1, 1, -1, -1, 1, 1, 0, 1, 1, 1, 0, 0, -1, 0, 1, 0, 0, 0, 0, -1, 0, 0, 1, 0, -1, 0, -1, -1, 0, 1, 0, -1, -1, -1, 0, -1, -1, -1, 0, 1, 0, -1, 1, -1, -1, 0, -1, 1, 1, -1, -1, 0, 0, 0, 1, 1, 1, 0, 1, 0, -1, 0, 1, 1, -1, -1, -1, 0, 1, -1, 0, 0, -1, 0, 0, 0, 1, 0, 1, 0, 0, 0, -1, -1, 0, 1, -1, 0, 0, 0, 1, -1, 0, 1, 1, -1, 1, 0, 0, -1, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, -1, 0, 1, -1, 1, 1, -1, 0, 1, -1, 1, -1, 1, -1, 0, 1, -1, 1, 1, 1, -1, 1, 0, 1, 1, 1, -1, 1, 1, -1, -1, 0, 1, 1, 0, -1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 0, 0, 1, 1, 0, -1, 1, 0, 1, 0, 1, -1, -1, -1, -1, 1, 0, 0, 1, 0, 1, -1, -1, 0, -1, 0, -1, 0, 0, 1, 1, 0, 0, 1, 0, 0, -1, -1, -1, -1, 0, 0, 0, 0, -1, 0, -1, -1, -1, 1, -1, 0, -1, -1, 1, -1, 0, 1, 0, 1, 1, 0, 0, -1, 1, -1, 0, 1, 1, 1, 1, 0, 0, 1, 0, 0, 1, -1, 0, 0, 0, 1, 0, 0, -1, -1, 0, -1, -1, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, -1, 0, 1, 1, 0, 1, 0, 0, -1, 0, 1, 0, 1, -1, -1, -1, 0, -1, 0, 0, -1, 1, 1, 0, 1, -1, -1, -1, -1, -1, 1, -1, 1, -1, 1, 0, 1, 1, 1, -1, -1, 1, -1, 0, 0, 1, 1, 1, 0, 0, -1, 1, -1, -1, 0, -1, -1, -1, 1, 1, -1, 0, 1, 0, 1, 1, -1, 0, 0, -1, 1, 1, 0, -1, 0, 0, 1, 0, 1, 1, -1, -1, -1, 0, 0, -1, 0, 0, 0, 1, 1, 1, 0, 1, -1, 1, -1, -1, 0, 0, 1, 0, 0, -1, 1, 0, 0, -1, 0, 0, 0, 1, 0, 0, -1, -1, 1, -1, -1, -1, -1, 1, -1, 1, -1, 0, -1, -1, -1, -1, 1, 0, 1, -1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1, 0, 0, 1, 1, -1, 0, 0, 1, 1, -1, -1, -1, 1, 1, 1, 1, -1, 1, 0, 0, 1, -1, -1, 0, 0, 1, 0, -1, 0, -1, 0, 1, 1, -1, -1, 1, 1, 0, -1, 0, -1, 1, 0, 1, 0, 0, -1, 1, 0, 1, 0, 1, -1, -1, 0, -1, 1, 0, -1, 0, 0, 1, 0, 0, -1, -1, 0, 1, 0, -1, -1, -1, 1, 0, 1, 1, 0, 1, -1, 1, 1, -1, 1, 0, 1, -1, 0, -1, -1, -1, -1, 1, 1, 1, 0, 0, 0, -1, -1, 1, 1, -1, -1, 0, -1, 0, -1, 1, 1, -1, 1, -1, -1, 1, 0, 0, 0, -1, -1, 0, 0, 1, 0, 1, -1, 0, -1, 1, -1, 0, 0, 0, 0, 0, 0, 0, -1, 0, 1, -1, 0, -1, 1, -1, 1, 0, 0, 0, 1, -1, 1, 1, 0, -1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, -1, 0, -1, 0, -1, -1, 0, 0, -1, 0, 0, 1, 0, 1, 0, -1, 0, 1, 1, 0, -1, 1, 0, -1, -1, -1, -1, 0, 1, -1, 1, 1, -1, -1, -1, 1, -1, 1, 1, 0, 1, -1, -1, 0, 1, -1, 0, 0, -1, -1, 0, -1, 0, 0, 1, 0, 1, 0, -1, -1, 1, 1, 0, 1, 0, 1, 0, 1, 1, -1, 0, 1, -1, 0, 1, 0, 1, 1, 0, -1, 1, 1, -1, 1, 0, 1, -1, -1, 1, -1, 1, 1, 1, 1, 1, -1, 1, -1, -1, -1, -1, 1, 1, 1, 1, 1, -1, 1, 0, -1, -1, 0, 1, 1, -1, 0, -1, 1, -1, 0, -1, 1, 1, 0, -1, 0, 0, -1, 0, 0, 0, 1, 0, 1, -1, 0, 1, 0, 0, 0, 1, 0, 1, 1, -1, 1, 1, 0, 0, -1, -1, 1, 0, 0, -1, -1, -1, 1, 0, 0, -1, 0, 0, -1, -1, 0, 1, 1, 0, 0, 0, 0, 1, -1, -1, 1, 0, -1, -1, -1, 0, -1, -1, -1, 1, -1, -1, 1, 1, -1, 0, 1, 0, 0, 1, 0, -1, 0, 0, 0, 1, -1, -1, 1, 1, 0, 1, 0, 1, -1, 1, 0, -1, 0, 0, -1, -1, 0, -1, 1, -1, 0, 0, -1, 0, 1, 1, 0, -1, -1, 0, -1, -1, 1, 1, -1, -1, 1, 0, 1, 1, 0, 0, 1, -1, 1, -1, 1, 0, -1, 0, -1, -1, 1, 0, 1, 1, 0, 1, 0, -1, 1, 0, 0, 1, -1, -1, 0, -1, -1, -1, 0, -1, -1, 0, 1, 1, 1, 0, 1, 1, -1, 0, -1, -1, 0, -1, 1, 0, 0, 1, 1, 1, -1, -1, 0, 0, 1, -1, 0, 0, 0, 0, -1, 1, 0, -1, 1, 0, 0, 1, 0, 0, 0, 1, -1, 0, -1, 1, 1, 0, -1, -1, 0, 0, 0, 1, 0, 0, 1, -1, -1, -1, -1, 1, -1, -1, 1, 0, 1, 1, 0, -1, -1, 0, 1, -1, 0, -1, 0, -1, 1, -1, 0, -1, -1, 1, 0, 0, 0, 0, -1, -1, 0, -1, 1, -1, 1, -1, 0, -1, 0, -1, 1, 1, -1, -1, -1, 0, -1, 1, 0, -1, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, -1, 0, 1, 1, 1, 0, 1, 1, 1, -1, 0, -1, -1, -1, 1, -1, 1, -1, 0, 1, 1, -1, -1, 0, -1, 0, 1, 0, -1, 0, 1, 0, 1, -1, -1, 0, 1, 1, 0, -1, -1, 0, 0, 1, -1, -1, -1, 1, -1, 0, -1, -1, -1, 1, -1, -1, -1, 0, 1, -1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, -1, 1, 0, 1, -1, 1, -1, -1, 0, -1, 0, -1, 0, 0, -1, -1, 1, 1, -1, 0, -1, 1, 1, -1, 1, 0, 1, 1, 1, 0, 1, -1, 1, -1, 1, -1, -1, -1, 0, 0, 1, 0, 0, -1, 1, -1, -1, 0, -1, 1, 0, 1, 1, 1, 0, 1, -1, 0, -1, 0, 1, -1, -1, 0, 1, 0, -1, -1, 0, -1, 0, -1, 1, 1, 0, -1, 1, -1, 0, -1, -1, 0, 1, 0, -1, 0, 1, -1, -1, 1, -1, 1, 1, -1, -1, 1, -1, 1, 0, 0, 1, -1, 0, -1, 1, 0, 0, -1, 0, 0, 1, -1, 1, 1, 1, -1, 1, 0, 1, -1, -1, 1, 1, 0, 1, 0, 1, 0, 1, -1, 1, 1, 1, -1, 0, 0, 1, 0, -1, 0, -1, -1, 1, 1, 1, 0, 0, 0, -1, -1, 1, 1, -1, 0, -1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, -1, 0, 0, 1, 1, -1, -1, -1, 0, -1, 1, 1, 0, 1, 0, -1, 0, 1, -1, 0, 1, -1, 1, 0, 0, -1, 1, -1, 0, 0, -1, 0, 1, -1, -1, -1, 1, 0, 0, 0, 0, 0, -1, 0, 0, 1, 1, -1, 1, 0, 1, 1, 1, -1, -1, 1, -1, 1, 1, 1, 1, 1, 0, 1, -1, 0, -1, 0, -1, -1, 1, 0, 0, 0, -1, 1, 0, 1, 1, 1, 1, 1, 0, -1, 0, 1, 1, 1, 1, -1, 1, -1, -1, -1, 1, -1, 0, 0, 0, 1, 0, 1, 1, -1, -1, 1, 1, -1, -1, 1, -1, 0, -1, -1, -1, 1, 0, 1, 1, -1, -1, -1, -1, 1, -1, 0, -1, -1, 1, -1, 1, 0, 0, 1, -1, 1, -1, 1, 0, 0, -1, 1, 0, 0, 1, 0, 1, 0, -1, 1, -1, 0, 1, 0, -1, 0, 0, -1, 0, -1, 1, 0, -1, -1, 0, 0, 1, 0, 0, 1, 1, 0, 1, -1, -1, 0, 1, 0, 1, -1, 0, 1, 0, 0, 0, 0, 1, -1, 0, 1, 1, -1, 0, -1, -1, -1, 0, -1, 1, 1, 1, 1, 0, 0, 0, 0, 0, -1, -1, 1, 1, 1, 1, 0, -1, -1, -1, 1, 0, -1, -1, -1, 0, 0, 0, 1, -1, -1, 1, -1, 0, 1, -1, -1, -1, 1, 0, 1, -1, -1, 1, 0, -1, -1, 1, 0, 0, 0, 1, 0, 0, 0, 1, -1, 0, 0, 0, 0, -1, -1, 1, 0, 0, 0, -1, 0, -1, -1, -1, 0, 1, 1, 1, 0, 0, 1, 1, -1, 0, -1, 1, 1, 1, 1, 0, 1, -1, 0, 1, 0, 1, -1, 0, 0, 1, -1, 0, -1, 0, -1, 1, 1, 1, 0, 1, 0, -1, 1, 0, -1, 1, -1, -1, -1, 0, -1, -1, 0, 1, -1, 1, 1, -1, 0, 1, 1, 1, -1, -1, 1, -1, 1, -1, -1, -1, -1, 0, -1, -1, -1, 0, 1, 1, -1, 0, 0, 0, 1, 1, -1, 1, 0, 1, 1, -1, -1, 0, 1, 1, 0, 0, -1, 0, 1, -1, 0, 1, -1, 0, 0, -1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, -1, 1, 0, 1, 1, 1, -1, 0, 1, 1, -1, -1, 0, 1, 1, -1, 0, 1, 1, 0, 0, -1, -1, 0, -1, 1, 1, -1, 1, 1, 0, 0, 1, 1, 0, -1, 1, 1, 1, -1, -1, 1, -1, -1, 1, -1, 1, 1, 0, 0, 1, -1, 1, 0, -1, -1, 0, 1, 0, -1, 0, -1, 0, 1, 1, 0, 1, 0, 1, -1, 0, 0, 0, 1, 1, 0, -1, 1, -1, 0, 1, 0, 1, 0, -1, 0, 0, 1, -1, 1, 0, 1, -1, 0, -1, 1, 1, -1, 1, 1, 0, 0, -1, 0, 0, 1, -1, 1, 0, -1, 1, 0, 0, -1, 0, 0, -1, 0, 0, 1, 1, -1, -1, 0, 0, 0, -1, 1, 0, 1, -1, -1, -1, 1, 1, -1, 0, -1, -1, -1, 0, 0, 0, -1, -1, -1, 0, 1, 0, -1, -1, 1, 1, 0, -1, -1, 1, 1, 0, 0, 0, 1, 0, 1, 1, -1, -1, 0, 1, 1, -1, -1, 1, 1, -1, 0, 0, 1, 1, 0, -1, 0, 0, 0, 0, -1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 0, -1, 1, -1, -1, 0, -1, -1, 0, 0, -1, 1, 1, -1, -1, 0, -1, 1, 0, 1, 1, 0, 1, 0, 0, 0, -1, 0, -1, 0, 0, 0, -1, 1, 0, 1, -1, -1, 0, 0, -1, -1, -1, -1, -1, 1, -1, -1, 1, -1, 1, 0, -1, 0, 1, -1, 0, -1, 0, -1, 1, -1, 1, 0, 1, 1, 0, -1, 1, 1, -1, -1, 1, 1, 0, 1, -1, 0, 0, -1, -1, 1, 0, 0, -1, -1, 1, 1, 1, 0, -1, -1, 1, -1, 1, -1, 0, 0, 1, 1, 0, 1, -1, -1, 1, 1, 1, -1, 1, 0, -1, -1, 0, -1, -1, -1, 1, -1, 1, 0, -1, 1, -1, -1, 1, 0, 0, 0, 1, 0, 0, 1, -1, -1, 1, 0, 0, -1, -1, 0, 0, 0, 1, 1, -1, 0, -1, -1, 0, 0, 0, -1, 0, 1, 1, -1, -1, 0, 0, 0, 0, 1, -1, 1, 1, 0, -1, -1, -1, 1, 0, -1, -1, 0, 0, 1, 0, 1, -1, 1, 1, 1, -1, -1, 0, -1, 0, 1, 0, -1, 0, 1, 0, 0, -1, 1, -1, 0, 0, 0, 1, 0, -1, -1, 1, 1, 0, 1, 1, 0, -1, 1, -1, 0, 1, -1, 1, -1, 1, 0, -1, -1, 0, 0, 1, 1, 1, -1, 0, 0, 1, 1, 0, 0, -1, 0, -1, -1, 1, 1, 1, -1, 1, -1, 1, 1, -1, 0, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, -1, 0, 0, -1, -1, 0, 0, -1, 1, 0, 1, -1, -1, 1, 0, 1, 0, -1, 1, 1, 0, 1, 1, -1, -1, 1, 0, 0, 1, 1, 0, -1, -1, -1, -1, -1, 1, -1, 0, -1, -1, -1, 0, 1, 0, 1, 0, -1, -1, 1, 1, -1, 0, 0, 0, -1, 0, 0, 1, 1, 1, -1, 0, -1, 0, -1, -1, -1, 1, 0, -1, 0, -1, 1, -1, 0, -1, 0, -1, 0, -1, 0, 0, 1, 0, -1, 1, 1, 0, -1, 0, -1, -1, 0, 1, -1, 1, -1, -1, 1, 1, -1, 0, -1, -1, 0, 1, 1, -1, -1, -1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1, 0, 1, 0, 0, -1, 0, 1, 0, 0, 0, -1, -1, 1, -1, 0, 0, 0, -1, 1, -1, -1, 1, 0, -1, 0, 0, 0, 0, -1, 0, 0, 0, 1, -1, -1, 0, 1, 0, 0, -1, 0, 0, 1, 1, -1, -1, 0, -1, 1, 0, 0, 1, 1, 0, 0, 0, -1, -1, 0, -1, 0, -1, 1, -1, 0, 1, -1, -1, 1, 0, -1, 0, 1, 0, 0, -1, -1, -1, 0, -1, 0, 1, -1, 1, 0, 1, -1, 0, -1, -1, 0, 1, 0, 1, 0, 1, 1, 0, -1, 1, 1, -1, 1, -1, -1, -1, 0, 1, -1, 0, 1, -1, 1, -1, 1, 1, 1, 0, 1, 0, -1, 1, 0, 0, 0, 1, 1, -1, -1, 0, 0, 0, -1, 0, -1, 1, 0, 0, 1, 0, 1, 0, -1, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, -1, 1, 1, -1, 0, 1, 0, 1, 1, 1, 1, -1, -1, -1, 0, 1, -1, -1, 0, 1, -1, 0, -1, 1, 1, 1, -1, -1, 0, 1, 1, -1, 1, 1, 1, 0, -1, 0, -1, 0, 1, 1, -1, 1, 0, -1, 1, 1, -1, -1, -1, -1, -1, 1, 0, 0, -1, -1, 0, 0, -1, 1, 1, 1, -1, 1, -1, -1, -1, 0, 0, 1, 1, 0, -1, 0, -1, 1, 0, 1, -1, -1, -1, 0, 0, 0, -1, 1, 0, -1, 1, 0, -1, 1, -1, 1, 0, 1, -1, -1, 0, 0, 0, -1, 1, -1, 1, 1, 0, -1, -1, 1, -1, -1, -1, -1, 1, -1, 0, 1, -1, 0, 0, 0, 1, -1, 0, -1, 0, 1, 0, -1, 1, 1, -1, -1, 0, -1, 0, 0, 1, 0, -1, 0, 1, -1, 0, 0, -1, -1, -1, -1, 1, -1, -1, -1, 0, 1, -1, -1, -1, 0, -1, 1, 1, 0, 1, 1, 0, 0, 0, -1, 0, 1, -1, 1, 1, 1, -1, 0, 0, -1, -1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 0, 0, 0, -1, 1, 0, 1, 1, 0, -1, 1, 1, 1, -1, 1, 0, 0, 0, 1, 1, 1, -1, 1, -1, -1, -1, 0, 1, -1, 0, -1, -1, 1, -1, -1, 0, 0, 0, -1, 1, 0, -1, 1, 1, 0, 1, 0, 0, -1, 1, -1, -1, 1, -1, 0, -1, 1, 1, -1, 1, 0, 1, -1, 0, 0, 1, -1, 0, 1, -1, -1, 1, 1, 1, -1, 1, 1, -1, 0, 0, -1, 0, 0, -1, -1, 0, 1, 1, -1, -1, -1, -1, 0, -1, -1, -1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, -1, -1, 0, -1, -1, 0, -1, 1, -1, -1, 0, 0, 1, 0, 0, 0, 0, -1, -1, 1, -1, 0, 1, -1, -1, -1, 0, 0, 0, 1, 0, 1, -1, 1, 1, 0, 0, -1, 1, 0, -1, 1, 1, 0, -1, 0, 0, 1, 1, -1, 0, -1, 0, 0, 0, 1, 1, 0, -1, 0, -1, -1, 0, -1, 0, 1, -1, -1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, -1, -1, 1, 0, -1, 1, 0, -1, 0, 1, 1, -1, 0, 0, 1, 0, 0, 0, 1, 0, 1, -1, 1, -1, 1, 1, -1, 1, 1, 1, -1, 1, -1, 1, 0, 0, 1, 0, -1, 1, -1, 0, -1, 1, 0, 0, 0, 1, 1, 1, -1, 1, 1, -1, 1, 0, -1, 0, -1, -1, -1, 1, 1, 0, 1, -1, 1, 1, 0, -1, -1, 1, 0, 1, 0, 0, 1, 0, -1, 1, -1, 0, 1, -1, -1, -1, -1, -1, 1, 1, 0, 1, 1, 1, 1, 0, -1, 0, -1, 0, 1, 0, 1, -1, 0, 0, 0, 1, 1, -1, -1, -1, 0, 1, 0, 1, -1, 1, -1, 1, 1, -1, -1, 1, 1, 0, -1, 0, 0, 1, -1, 1, -1, 1, 0, -1, -1, -1, 1, 0, 1, 0, -1, 0, 0, 1, 1, -1, -1, 0, 1, 1, 1, -1, 1, 1, -1, -1, -1, -1, 1, 0, 0, 0, 1, -1, 1, 0, -1, -1, -1, -1, -1, -1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 0, 1, 1, -1, 1, 1, 0, 1, 1, -1, -1, 0, -1, 0, -1, -1, -1, 1, 0, 0, -1, 0, 1, -1, 1, 0, 0, 0, 1, 1, 1, 0, 0, -1, 0, -1, -1, -1, 1, -1, 0, 1, 1, 1, 1, -1, -1, -1, 0, 0, 0, -1, 1, 1, 1, 0, 0, 0, 1, 1, 1, -1, -1, -1, -1, 0, 1, 0, 0, 0, 0, 1, -1, 0, 1, -1, 1, 1, 1, -1, -1, 1, 1, -1, 0, 1, 1, -1, -1, 1, 0, -1, 0, 0, -1, 1, 1, -1, 0, 1, -1, 0, -1, -1, 1, 0, -1, 0, 0, -1, 1, 1, -1, -1, -1, 1, 0, 0, -1, 1, 1, -1, -1, 1, -1, 1, -1, 1, 0, -1, 0, -1, 0, 1, -1, -1, 0, 1, 0, 1, -1, 0, 1, 1, 0, 0, -1, -1, 0, 0, 1, 0, -1, 1, 1, 0, 0, 1, 1, 0, -1, -1, 1, 0, 0, 1, -1, -1, 0, 1, 1, 1, -1, 0, 1, 1, -1, 1, 0, 1, -1, 0, 0, 0, 1, 0, 1, -1, -1, -1, -1, -1, -1, 0, 0, 1, 0, -1, 1, 1, -1, 1, -1, -1, 0, 0, 1, 1, -1, -1, 0, -1, 0, 1, 0, 1, -1, 1, 0, 1, 1, -1, 0, 1, -1, 1, 0, 0, -1, -1, 0, 1, 0, 1, -1, 1, 0, 1, -1, 0, -1, 1, 1, 1, 0, 1, 1, -1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, -1, 1, 1, 1, -1, 0, -1, 0, -1, -1, 1, -1, 1, 1, 1, 0, 0, -1, 0, 1, 0, -1, -1, 1, 0, 1, 0, -1, 1, 0, 1, -1, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, 1, 0, 0, 1, -1, 0, 1, 0, 1, 0, 1, 0, 1, 0, -1, 1, -1, -1, 0, 0, 0, -1, -1, 1, 0, 1, 1, -1, 0, 1, -1, 1, 1, 0, -1, 0, 1, 0, 1, -1, 1, -1, -1, 1, 0, 0, 0, -1, 1, -1, 1, 1, 0, -1, 0, -1, 0, 1, 0, -1, -1, 0, 0, 1, 1, -1, 1, 1, 1, 0, 1, 0, -1, 0, 1, 1, 1, -1, 1, -1, 1, -1, 0, 1, -1, 0, -1, -1, 0, 1, -1, -1, 1, 1, 0, -1, 0, 0, -1, -1, 1, 1, -1, -1, -1, 1, 1, 1, -1, -1, 0, 1, -1, -1, 0, -1, -1, -1, 1, -1, -1, -1, -1, -1, -1, 1, 0, 1, 1, 1, 0, 1, -1, 0, 0, 0, 1, 0, 0, 1, -1, 1, 0, -1, 0, 1, 1, -1, -1, -1, 0, 1, 0, -1, 0, 0, -1, 0, 0, 0, 0, -1, 0, -1, 0, -1, 0, 0, -1, 1, 0, 0, 1, 1, -1, 0, 0, 0, 0, 0, -1, 0, -1, -1, 1, 1, -1, -1, -1, 0, 1, -1, 1, 0, 0, 1, 1, 1, 1, 1, -1, -1, 0, -1, -1, 1, 1, 1, -1, -1, 1, -1, -1, -1, 1, 1, 0, 0, 1, 0, -1, -1, 1, 1, 1, -1, -1, -1, -1, 1, 1, 0, -1, -1, 1, -1, 0, 1, -1, 0, 1, 0, -1, 1, 0, -1, -1, -1, 0, 1, 1, 0, 1, 1, -1, 0, 0, 1, 0, 1, 0, 0, 0, 0, -1, 0, 0, 1, 0, 0, -1, 1, 1, -1, 0, -1, 1, 1, 0, 0, -1, -1, -1, 1, 1, 1, -1, -1, 0, -1, -1, -1, 1, 0, 1, 0, -1, 0, 0, 1, 1, 0, 0, -1, -1, 0, -1, 0, 1, 1, 0, 0, 0, -1, -1, 0, -1, -1, -1, 1, 0, 1, 1, 1, 1, 0, -1, -1, -1, 1, 0, 1, 1, 0, 0, 1, -1, -1, 0, -1, -1, 0, 0, 0, 1, -1, -1, 1, 1, 0, -1, 1, -1, 1, 1, -1, 1, 0, 1, 0, 1, 0, 0, 1, 0, -1, 0, -1, -1, 1, -1, 1, -1, 1, -1, 0, 0, 0, 1, 0, 0, -1, 0, 1, -1, 1, 0, 0, 0, 0, -1, -1, -1, 1, -1, -1, -1, 1, 1, -1, -1, 1, 1, -1, -1, 1, -1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 1, -1, -1, -1, 0, -1, -1, -1, 0, 0, -1, 1, -1, 1, 0, -1, -1, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0, 1, -1, 1, -1, -1, 0, 1, 0, 1, 0, 1, -1, 0, 1, 0, 1, -1, 0, 1, 0, 0, -1, 0, 1, 1, 0, -1, -1, 1, 0, -1, -1, 0, 0, 0, 1, -1, -1, 0, -1, 1, 1, 1, -1, 1, 0, -1, 0, 1, 1, 1, 1, -1, -1, -1, 0, 0, 0, -1, -1, 1, 1, -1, 0, 1, -1, 1, 0, 1, -1, 1, -1, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, -1, 0, 1, 1, -1, 0, 0, 0, -1, 0, 1, 1, 0, -1, -1, 0, -1, 1, 0, -1, -1, 0, 1, 0, 0, 1, 1, 1, -1, 1, -1, -1, 1, 1, 1, -1, -1, -1, -1, 0, -1, 1, -1, 0, -1, 1, 1, -1, 0, -1, 1, 1, -1, 1, -1, -1, -1, 1, -1, 0, 1, 1, 1, -1, 1, -1, 1, -1, -1, -1, -1, 1, 1, 0, 0, 1, -1, -1, 1, -1, 0, 0, 0, 0, 1, -1, 1, 1, -1, -1, 1, 0, 0, -1, -1, 1, 0, 1, -1, -1, 1, 1, -1, 1, 0, -1, -1, 1, 0, 0, 0, 1, -1, 0, 1, 0, -1, 1, 1, 1, -1, 1, 0, 1, 0, 1, 0, 0, 0, 0, -1, -1, 0, 1, 0, 0, 0, 0, 0, 1, -1, 1, -1, 1, 1, -1, -1, -1, 1, 1, -1, 0, 1, 0, 0, 0, 1, 1, 0, 1, 1,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1, 0, -1, 1, 0, -1, 1, 0, 0, 0, -1, -1, 0, 0, 1, 1, -1, 0, 1, 0, 1, -1, 1, 1, 0, 0, -1, -1, -1, -1, 1, -1, 1, -1, 1, -1, 1, 0, 0, 1, 1, -1, 0, -1, 1, 1, 1, -1, 1, -1, 0, 1, 1, -1, 0, 0, -1, 0, -1, 1, -1, 1, -1, 0, -1, 1, 1, 0, 0, 0, 1, -1, 0, -1, 1, -1, 1, 0, -1, 0, 0, 1, 0, -1, -1, -1, 0, -1, -1, 0, 0, 0, -1, 0, -1, 1, 1, 1, 1, -1, 0, 0, 1, 0, 1, 1, 1, -1, 0, -1, 0, 1, 0, 0, 0, 0, -1, 0, 0, -1, 0, -1, -1, -1, 1, 0, 1, 1, 1, -1, -1, -1, 0, -1, 1, 0, -1, 0, 0, 0, 0, -1, 0, 1, 0, 1, -1, -1, 1, -1, 1, 0, 1, -1, 0, 0, -1, -1, 1, -1, 1, 0, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, -1, 0, -1, -1, 0, 0, 1, -1, 1, 1, 0, 0, 1, 0, 0, -1, 0, -1, -1, 1, -1, -1, 1, 0, 0, 0, -1, 0, -1, 0, 1, -1, -1, -1, 0, 0, 0, 1, 0, -1, -1, 1, -1, 1, 1, -1, -1, 0, 1, 1, -1, 0, 0, 1, -1, 1, -1, 0, 0, 1, 1, 1, -1, 1, -1, 0, 1, -1, 0, -1, 1, 1, 0, 0, -1, -1, 0, 0, -1, 1, -1, -1, 0, 1, 1, 0, -1, 1, 0, -1, -1, -1, 1, 0, 0, -1, 1, 1, -1, 1, -1, 1, 0, 0, 0, -1, 0, 0, 1, 1, -1, 1, 0, 1, 0, 0, 1, 1, -1, 1, 1, 1, 0, 1, 1, 1, -1, -1, -1, 1, -1, -1, -1, -1, 0, -1, -1, 0, -1, -1, 1, -1, 0, 0, 0, -1, -1, 1, 0, -1, 0, 0, -1, -1, 1, -1, 1, 1, 0, -1, 0, 0, 0, 1, 0, 0, -1, 1, -1, 0, 1, -1, -1, -1, -1, 1, 0, -1, -1, 0, 0, 1, 0, 0, -1, -1, 0, 1, 0, -1, -1, -1, -1, 1, 0, -1, 1, 1, 1, -1, 1, -1, 0, -1, 1, -1, -1, 1, -1, -1, -1, 0, 0, 1, -1, 1, 1, -1, -1, -1, -1, -1, 0, -1, 1, 0, 0, 1, 1, -1, -1, 0, -1, -1, -1, 1, 0, 0, -1, 1, 1, -1, 0, 0, -1, -1, 1, -1, 1, 1, -1, 1, 1, 1, 0, -1, 0, 0, 1, 0, 1, -1, 1, 0, 0, 0, 1, 1, 1, 0, -1, -1, 0, 0, 0, 0, -1, -1, -1, 1, 1, 1, 1, 0, 0, 1, 1, -1, -1, 0, 1, 0, 0, 0, 1, 0, 0, -1, -1, 0, 0, 0, 0, 1, -1, 0, 1, 1, 1, -1, -1, 1, -1, -1, -1, 1, 0, 0, -1, 0, 1, 0, 1, 0, 1, 1, 0, 0, 1, 1, -1, -1, 1, 0, 0, 0, 1, -1, 0, -1, -1, -1, 0, -1, -1, 1, 1, -1, -1, 0, -1, -1, -1, 0, 1, 1, -1, 0, 0, 1, 1, 1, 0, -1, 0, 0, -1, 1, -1, 0, 0, 0, -1, 0, 0, 1, -1, 1, 0, -1, 0, 0, -1, 1, -1, -1, -1, 0, 0, -1, 1, 0, 1, -1, -1, -1, 1, 0, 0, -1, 1, -1, 1, 0, -1, 0, -1, -1, -1, 1, -1, 1, 1, 1, 0, 1, -1, -1, 0, -1, 1, 0, -1, 1, 0, 1, -1, 1, -1, -1, 1, 1, 0, 0, 0, 1, -1, -1, -1, 1, 0, 0, 0, 0, -1, -1, 1, -1, -1, 0, 1, -1, -1, -1, 1, 1, -1, 0, 0, 0, -1, 0, 1, -1, -1, 1, 0, -1, -1, 0, 1, -1, 1, -1, -1, -1, -1, 1, -1, -1, 0, 0, -1, 0, 1, 1, -1, 0, 1, 0, 0, 0, -1, -1, 1, 0, 1, 0, 0, 0, -1, -1, 0, -1, 1, -1, 0, 1, 0, -1, -1, 0, 0, 1, 1, -1, 1, -1, -1, -1, 0, 0, -1, 0, -1, 1, 1, 0, -1, 1, 1, -1, 0, 1, 1, 0, -1, -1, -1, -1, 0, 1, 0, 0, 0, -1, -1, 0, -1, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0, -1, -1, -1, 0, 1, 0, -1, 1, 0, 1, 0, -1, 1, -1, 0, 1, 0, 0, 0, -1, 1, 1, -1, -1, 1, 1, -1, 1, 1, 0, 1, -1, 1, 1, 0, 1, 1, -1, 0, 0, -1, 0, 0, 0, 1, 1, -1, 1, -1, 1, -1, 0, 1, 1, 0, 0, 1, -1, 0, 1, 1, -1, 0, -1, 1, -1, 0, -1, 0, -1, 1, 0, -1, -1, 1, 1, 0, 0, 1, 1, 1, 0, 1, 1, 1, 0, -1, -1, 1, -1, 0, -1, -1, 0, 1, -1, 0, 0, 1, 0, 0, -1, 1, 0, 0, 1, 0, 1, -1, -1, 0, 0, -1, -1, 0, 1, 0, -1, 1, 1, 0, 0, -1, -1, -1, 1, 1, 0, -1, -1, 1, -1, 0, -1, -1, -1, 0, -1, 0, -1, -1, 0, 1, -1, 1, 1, 0, -1, 1, 1, 1, -1, -1, -1, 0, 0, 0, -1, -1, 1, -1, 0, -1, -1, 0, -1, -1, 0, -1, 0, -1, 0, -1, -1, 0, 1, 1, 1, -1, 1, 1, -1, -1, 1, 0, 0, 0, 0, 1, -1, -1, -1, 0, 1, 0, 1, -1, 1, -1, 1, 0, 0, 1, -1, -1, -1, -1, -1, 0, -1, 0, 0, 0, 1, 1, 0, 1, -1, 0, -1, 0, 0, -1, 1, -1, -1, 0, 0, -1, 0, 1, 0, -1, 1, -1, -1, 1, 0, 1, 0, 0, 1, 0, -1, 0, 0, 1, 0, 0, -1, -1, 1, 1, 1, -1, 0, 1, -1, 1, 1, 1, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 1, -1, -1, -1, 0, 0, 0, 1, 1, 1, 0, -1, 1, -1, -1, 0, 1, 1, 1, 1, 0, -1, 0, 0, 1, 1, 1, 0, 1, 0, 1, 0, 0, -1, 0, -1, 1, 1, -1, -1, -1, 0, -1, 0, -1, 1, 0, -1, 1, 0, 1, 1, -1, -1, 0, 1, 0, 0, 1, 1, 1, 1, -1, 1, 0, 0, 0, 0, -1, 0, -1, 0, 1, 0, 1, 0, 1, -1, 1, 0, 1, 0, 1, -1, 1, 0, 0, 1, 1, 1, -1, 0, 1, -1, -1, 0, -1, 1, 1, -1, 1, 0, -1, 1, -1, -1, -1, -1, -1, -1, 1, 1, -1, 0, -1, -1, -1, 0, -1, 1, 1, 1, 1, 0, -1, 1, -1, 0, -1, -1, 0, -1, 0, 1, 1, -1, 0, -1, -1, 1, -1, -1, 0, 1, 1, 1, -1, -1, -1, 0, -1, 0, 0, 1, -1, 0, 0, 1, -1, 1, 1, -1, -1, 1, 1, 1, -1, 1, -1, 1, 1, 0, 1, -1, 0, -1, 0, 1, -1, 1, -1, 1, 0, 1, 1, 0, 1, -1, 1, -1, 1, 1, -1, -1, 1, 1, 0}
kt, err := NewKey(Trytes("A99999999999999999999999999999999999999999999999999999999999999999999999999999999"), 1, 2)
if err != nil {
t.Fatalf("NewKey(): %#v", err)
}
if !keyTrits.Equal(kt.Trits()) {
t.Fatalf("NewKey() trits mismatch\n\n%#v\n%#v", keyTrits, kt)
}
}
func TestNewKeyShortSeed(t *testing.T) {
_, err := NewKey(Trytes("A"), 1, 2)
if err == nil {
t.Errorf("expected to get an error")
}
}
func TestDigests(t *testing.T) {
digests := Trits{0, -1, -1, 0, -1, -1, 0, 1, -1, 0, 0, 0, 0, 1, 1, 0, -1, 1, 1, 0, 1, 1, 1, -1, 0, 1, 0, 0, 1, 0, -1, 1, 0, 1, -1, 0, -1, -1, 0, 1, -1, 1, -1, -1, 0, 0, -1, 1, 0, -1, 0, -1, -1, -1, -1, 1, -1, 0, 0, 0, -1, 1, 1, 0, 0, 1, -1, 0, 1, -1, 0, -1, 1, 0, 1, 1, 0, -1, 1, -1, -1, 1, 0, 1, 0, -1, 1, -1, 1, -1, 0, -1, -1, 1, -1, 0, 1, 1, 0, 0, 1, 1, -1, -1, 1, -1, 0, 1, 0, -1, 1, -1, 1, -1, 0, 0, 1, 1, 1, 1, 1, 0, 0, -1, 1, 0, -1, -1, 0, 0, 0, 0, 0, -1, 0, -1, 1, -1, -1, 0, 1, 1, 1, 0, 0, -1, 0, -1, 0, 0, 0, 0, -1, -1, -1, -1, 0, 1, 0, 0, -1, -1, -1, -1, -1, -1, 1, 0, 1, -1, 0, 1, 1, 1, 0, 1, 0, -1, -1, 1, -1, 1, 1, 0, -1, -1, 0, 0, 1, -1, -1, -1, 1, -1, 0, 0, 1, 0, -1, 0, 0, 1, 1, -1, -1, -1, 1, -1, 0, 1, 1, 0, 1, 0, 0, -1, 1, -1, 1, 1, 0, 0, 0, 1, -1, -1, 1, 0, 1, -1, -1, 0, -1, -1, -1, 1, 0, -1, 0, 1, -1, -1, 0, -1, 0, 1, 1, 0, 1, 0, -1, 1, -1, -1, 0, 1, -1, -1, 1, 1, 1, -1, 1, -1, -1, 0, 1, 1, 0, 1, 0, -1, 1, -1, -1, -1, 1, 0, 0, -1, 0, 1, -1, 0, 0, 0, 0, -1, 1, 0, -1, 1, 0, 1, 0, 1, 1, 1, 0, 0, 1, 1, -1, 1, 1, -1, 0, 1, 0, 1, 0, 1, 1, 1, -1, -1, 0, 1, 1, 0, -1, -1, 0, -1, 0, 1, -1, -1, -1, 0, 1, 0, 0, 1, 1, -1, 0, -1, 1, 0, 0, -1, -1, -1, -1, 0, 1, 1, -1, -1, -1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, -1, 0, 1, -1, -1, -1, -1, -1, 1, 0, 1, 0, 1, 0, -1, 1, -1, -1, -1, -1, 1, 1, -1, 0, 0, 0, 0, -1, 0, 1, 0, -1, 0, 1, 1, 1, 1, -1, -1, -1, 0, -1, 0, 0, -1, 1, 1, -1, -1, 1, 0, 1, 0, -1, 1, 0, -1, 1, -1, 0, -1, 1, 1, 1, -1, 1, -1, -1, 0, -1, 1, -1, 0, 0, -1, -1, 1, 1, -1, -1, -1, 1, -1, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1, -1, 0, 1, 0, -1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, -1, 1, 1, 0, 1, 1, -1, 1, 0, -1, -1, -1, 1, 0}
kt, err := NewKey(Trytes("A99999999999999999999999999999999999999999999999999999999999999999999999999999999"), 0, 2)
if err != nil {
t.Fatalf("NewKey(): %#v", err)
}
ds, err := Digests(kt.Trits())
if err != nil {
t.Fatalf("Digests() expected err to be %#v but got %#v", nil, err)
}
if !digests.Equal(ds) {
t.Fatalf("Digests() trits mismatch\n\n%#v\n%#v", digests, ds)
}
}
func TestNewAddressFromTrytes(t *testing.T) {
tests := []struct {
name string
address Trytes
validAddr bool
checksum Trytes
validChecksum bool
}{
{
name: "valid address and checksium",
address: "RGVOWCDJAGSO9TNLBBPUVYE9KHBOAZNVFRVKVYYCHRKQRKRNKGGWBF9WCRJVROKLVKWZUMBABVJGAALWU",
validAddr: true,
checksum: "NPJ9QIHFW",
validChecksum: true,
},
{
name: "test blank address fails",
address: "",
validAddr: false,
checksum: "",
validChecksum: true,
},
{
name: "valid address and checksum",
address: "999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999",
validAddr: true,
checksum: "A9BEONKZW",
validChecksum: true,
},
{
name: "valid address with invalid checksum",
address: "RGVOWCDJAGSO9TNLBBPUVYE9KHBOAZNVFRVKVYYCHRKQRKRNKGGWBF9WCRJVROKLVKWZUMBABVJGAALWU",
validAddr: true,
checksum: "A9BEONKZW",
validChecksum: false,
},
}
for _, tt := range tests {
adr, err := tt.address.ToAddress()
switch {
case (err != nil) == tt.validAddr:
t.Fatalf("%s: NewAddressFromTrytes(%q) expected (err != nil) to be %#v\nerr: %#v",
tt.name, tt.address, tt.validAddr, err)
case (err == nil && adr.Checksum() != tt.checksum) == tt.validChecksum:
t.Fatalf("NewAddressFromTrytes(%q) checksum mismatch\nwant: %s\nhave: %s",
tt.address, tt.checksum, adr.Checksum())
case !tt.validAddr || !tt.validChecksum:
continue
}
wcs := adr.WithChecksum()
if wcs != Trytes(adr)+adr.Checksum() {
t.Error("WithChecksum is incorrect")
}
adr2, err := ToAddress(string(tt.address))
if err != nil {
t.Error(err)
}
if adr != adr2 {
t.Error("ToAddress is incorrect")
}
}
}
func TestAddress(t *testing.T) {
tests := []struct {
name Trytes
seed Trytes
seedIndex int
seedSecurity int
address Trytes
addressValid bool
}{
{
name: "test valid address 1",
seed: "WQNZOHUT99PWKEBFSKQSYNC9XHT9GEBMOSJAQDQAXPEZPJNDIUB9TSNWVMHKWICW9WVZXSMDFGISOD9FZ",
seedIndex: 0,
seedSecurity: 2,
address: "AYYNHWWNZQOFYXNQSLVULU9ARZCSXNWWAFYEWEL9LIXYDFS9KDSRZF9ZID9AQWSLAEUAJSTQKGPGXNWCD",
},
{
name: "test valid address 2",
seed: "WQNZOHUT99PWKEBFSKQSYNC9XHT9GEBMOSJAQDQAXPEZPJNDIUB9TSNWVMHKWICW9WVZXSMDFGISOD9FZ",
seedIndex: 1,
seedSecurity: 2,
address: "9CTFIAYOFLOKXVNDFKNERQQEFR9FCIXQQHNRDKHIVVGFZQKTBWPCOIHCCQIU9ASJQECGPHDBAREDXIRCX",
},
}
for _, tt := range tests {
address, err := NewAddress(tt.seed, tt.seedIndex, tt.seedSecurity)
if err != nil {
t.Errorf("%s: NewAddress failed with error: %s", tt.name, err)
}
addressCheck, err := tt.address.ToAddress()
if err != nil {
t.Errorf("%s: ToAddress failed with err: %s", tt.name, err)
}
if address != addressCheck {
t.Errorf("%s: address: %s != address: %s", tt.name, address, addressCheck)
}
err = address.IsValid()
if err != nil {
t.Errorf("%s: address failed to validate: %s", tt.name, err)
}
}
}
func TestSeed(t *testing.T) {
for i := 0; i < 10000; i++ {
s1 := NewSeed()
if err := s1.IsValid(); err != nil {
t.Error("NewSeed is not valid")
}
s2 := NewSeed()
if err := s2.IsValid(); err != nil {
t.Error("NewSeed is not valid")
}
if s1 == s2 {
t.Error("NewSeed is incorrect")
}
}
}
func TestSign(t *testing.T) {
var seed Trytes = "WQNZOHUT99PWKEBFSKQSYNC9XHT9GEBMOSJAQDQAXPEZPJNDIUB9TSNWVMHKWICW9WVZXSMDFGISOD9FZ"
var bundleHash Trytes = "CDMEKHAJFKDZPPUSQWALZNFSDDRPQDEFSPUSHLSUDWWVLXYZJIG9XHVRFJZHFSMSXS9ZPQHLF9WTYBWDW"
var csign0 Trytes = "UWPPJJDCHSCYLJAYFWOFDVMJXPYZLSYVKLBMZEIVWICVSPWHZT9DDZGGEWELLYUVJCMXQBFD9THNDYYL9DQFISZSOOODSXLKQDERHZJLMFQGYBAMLMZUVV9OXVWSMHCXIUERHWHBV9WOQNMQBRONZBUOTBPAEGNEOXCVWPJTQWLQIMMXCIBGQGVIYVNKZRWPARGFBCPADR9F9WVPEITQTFZOXJHBUTPVAERLSRY9BNWFHVPQXSAQCJDHRAPZEKLMWSOYQOBJVGYUMQDQVAB9YKNUEHSRQBXTHXISOOGGPAJZPUEMUNZSWUQNH9YYVRBLGKBCLPOFCLTTDXSYFZQSNEVRWGWEGMTUKSOSXCOW9XKQICIGNNGE9ZKLUUOMZIQKIDEWHWVKONQ9RTTFRBSRYIBFWNIFHFDXCBGZSU9GSCXGSIJBWSFINWJTQXOLPIPNDACJPIOFPNSGGUQMUFAAOBQZVRAPJCDAY9QDA9PUDRKQYQTGBLPKVGJLEKJTNISPOJXUXQCVIZADPGYA9GQIDRBJRVIQRDDQJG9EHIWAHWIW9OGKZWTAWOBBDSJLDWMFANWSTCAGPGXEEFNEFYMKUAAEOOYJPDXABGTZUKDKVUNKETCAGCF9LRHSIDZINZJWPANOVLJ9HBQWNSAVOAHYBNYGUQVHISTUTEAVROWYFDTGQAZAPYDHPHSGDEYVTHFKBHUIAXOSUSQ9PNJKXEWPIEAICHCEOYEOWQFLUBMRSJEE9SFKIAXONTI9DRRFNPAP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EAVD9VRS9HFPJRZGLXNHHPVFMBLMIURDRSXUABNRQDETBSSNJMICLUIVLNKNBXEICKKNJDRAWTFEPQGBGDYJBFAKRGSKPIOLQACNXOLXOXACAKEQWDKRFOIGXXYWOJLNBGSVRYTTBCNWQTCYJLBGANPPQPGEKA9QJTADGIEKXKIAEOQUK9VHAGWLITQNC9SPIXCHC9HOTDX9MXKLNGPPUHWOQ9GVP99WNB9PHJDHGPOQAIGVKJYDGCFEZMKQRXXDYYHIYXPMPAVWDLRMKNGBFRQMWAJQDFWSZAGTWFUD9JTWAURSCGWGIWHLUCYLDUSMDMZBEBTABKRNIHLNTJWRZWXQRPZARTDFNJXVUOMCSQSTNXKDQRAFMYRPMPHNDCPXPKTIDAAFCWCZINJISIHVLHXNZVBCKWCFIMXWEFZJLFBASOWQRSQTP9LXTATNYYW"
key, err := NewKey(seed, 0, 2)
if err != nil {
t.Fatalf("NewKey(): %#v", err)
}
norm := bundleHash.Normalize()
sign0 := Sign(norm[:27], key[:SignatureSize/3])
if sign0 != csign0 {
t.Error("sig is incorrect.")
}
sign1 := Sign(norm[27:54], key[SignatureSize/3:SignatureSize*2/3])
if sign1 != csign1 {
t.Error("sig is incorrect.")
}
adr, err := NewAddress(seed, 0, 2)
if err != nil {
t.Fatal(err)
}
if !IsValidSig(adr, []Trytes{sign0, sign1}, bundleHash) {
t.Error("cannot validate signature.")
}
}