Logo Search packages:      
Sourcecode: saods9 version File versions

lex.filt.c

#define yy_create_buffer filt_create_buffer
#define yy_delete_buffer filt_delete_buffer
#define yy_scan_buffer filt_scan_buffer
#define yy_scan_string filt_scan_string
#define yy_scan_bytes filt_scan_bytes
#define yy_flex_debug filt_flex_debug
#define yy_init_buffer filt_init_buffer
#define yy_flush_buffer filt_flush_buffer
#define yy_load_buffer_state filt_load_buffer_state
#define yy_switch_to_buffer filt_switch_to_buffer
#define yyin filtin
#define yyleng filtleng
#define yylex filtlex
#define yyout filtout
#define yyrestart filtrestart
#define yytext filttext
#define yywrap filtwrap

/* A lexical scanner generated by flex */

/* Scanner skeleton version:
 * $Header: /proj/rd/cvsroot/saods9/saotk/filter/lex.filt.c,v 1.1.1.1 2003/12/05 19:40:27 joye Exp $
 */

#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
#define YY_FLEX_MINOR_VERSION 5

#include <stdio.h>
#include <unistd.h>


/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
#ifdef c_plusplus
#ifndef __cplusplus
#define __cplusplus
#endif
#endif


#ifdef __cplusplus

#include <stdlib.h>

/* Use prototypes in function declarations. */
#define YY_USE_PROTOS

/* The "const" storage-class-modifier is valid. */
#define YY_USE_CONST

#else /* ! __cplusplus */

#if __STDC__

#define YY_USE_PROTOS
#define YY_USE_CONST

#endif      /* __STDC__ */
#endif      /* ! __cplusplus */

#ifdef __TURBOC__
 #pragma warn -rch
 #pragma warn -use
#include <io.h>
#include <stdlib.h>
#define YY_USE_CONST
#define YY_USE_PROTOS
#endif

#ifdef YY_USE_CONST
#define yyconst const
#else
#define yyconst
#endif


#ifdef YY_USE_PROTOS
#define YY_PROTO(proto) proto
#else
#define YY_PROTO(proto) ()
#endif

/* Returned upon end-of-file. */
#define YY_NULL 0

/* Promotes a possibly negative, possibly signed char to an unsigned
 * integer for use as an array index.  If the signed char is negative,
 * we want to instead treat it as an 8-bit unsigned char, hence the
 * double cast.
 */
#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)

/* Enter a start condition.  This macro really ought to take a parameter,
 * but we do it the disgusting crufty way forced on us by the ()-less
 * definition of BEGIN.
 */
#define BEGIN yy_start = 1 + 2 *

/* Translate the current start state into a value that can be later handed
 * to BEGIN to return to the state.  The YYSTATE alias is for lex
 * compatibility.
 */
#define YY_START ((yy_start - 1) / 2)
#define YYSTATE YY_START

/* Action number for EOF rule of a given start state. */
#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)

/* Special action meaning "start processing a new file". */
#define YY_NEW_FILE yyrestart( yyin )

#define YY_END_OF_BUFFER_CHAR 0

/* Size of default input buffer. */
#define YY_BUF_SIZE 16384

typedef struct yy_buffer_state *YY_BUFFER_STATE;

extern int yyleng;
extern FILE *yyin, *yyout;

#define EOB_ACT_CONTINUE_SCAN 0
#define EOB_ACT_END_OF_FILE 1
#define EOB_ACT_LAST_MATCH 2

/* The funky do-while in the following #define is used to turn the definition
 * int a single C statement (which needs a semi-colon terminator).  This
 * avoids problems with code like:
 *
 *    if ( condition_holds )
 *          yyless( 5 );
 *    else
 *          do_something_else();
 *
 * Prior to using the do-while the compiler would get upset at the
 * "else" because it interpreted the "if" statement as being all
 * done when it reached the ';' after the yyless() call.
 */

/* Return all but the first 'n' matched characters back to the input stream. */

#define yyless(n) \
      do \
            { \
            /* Undo effects of setting up yytext. */ \
            *yy_cp = yy_hold_char; \
            YY_RESTORE_YY_MORE_OFFSET \
            yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
            YY_DO_BEFORE_ACTION; /* set up yytext again */ \
            } \
      while ( 0 )

#define unput(c) yyunput( c, yytext_ptr )

/* The following is because we cannot portably get our hands on size_t
 * (without autoconf's help, which isn't available because we want
 * flex-generated scanners to compile on their own).
 */
typedef unsigned int yy_size_t;


struct yy_buffer_state
      {
      FILE *yy_input_file;

      char *yy_ch_buf;        /* input buffer */
      char *yy_buf_pos;       /* current position in input buffer */

      /* Size of input buffer in bytes, not including room for EOB
       * characters.
       */
      yy_size_t yy_buf_size;

      /* Number of characters read into yy_ch_buf, not including EOB
       * characters.
       */
      int yy_n_chars;

      /* Whether we "own" the buffer - i.e., we know we created it,
       * and can realloc() it to grow it, and should free() it to
       * delete it.
       */
      int yy_is_our_buffer;

      /* Whether this is an "interactive" input source; if so, and
       * if we're using stdio for input, then we want to use getc()
       * instead of fread(), to make sure we stop fetching input after
       * each newline.
       */
      int yy_is_interactive;

      /* Whether we're considered to be at the beginning of a line.
       * If so, '^' rules will be active on the next match, otherwise
       * not.
       */
      int yy_at_bol;

      /* Whether to try to fill the input buffer when we reach the
       * end of it.
       */
      int yy_fill_buffer;

      int yy_buffer_status;
#define YY_BUFFER_NEW 0
#define YY_BUFFER_NORMAL 1
      /* When an EOF's been seen but there's still some text to process
       * then we mark the buffer as YY_EOF_PENDING, to indicate that we
       * shouldn't try reading from the input source any more.  We might
       * still have a bunch of tokens to match, though, because of
       * possible backing-up.
       *
       * When we actually see the EOF, we change the status to "new"
       * (via yyrestart()), so that the user can continue scanning by
       * just pointing yyin at a new input file.
       */
#define YY_BUFFER_EOF_PENDING 2
      };

static YY_BUFFER_STATE yy_current_buffer = 0;

/* We provide macros for accessing buffer states in case in the
 * future we want to put the buffer states in a more general
 * "scanner state".
 */
#define YY_CURRENT_BUFFER yy_current_buffer


/* yy_hold_char holds the character lost when yytext is formed. */
static char yy_hold_char;

static int yy_n_chars;        /* number of characters read into yy_ch_buf */


int yyleng;

/* Points to current character in buffer. */
static char *yy_c_buf_p = (char *) 0;
static int yy_init = 1;       /* whether we need to initialize */
static int yy_start = 0;      /* start state number */

/* Flag which is used to allow yywrap()'s to do buffer switches
 * instead of setting up a fresh yyin.  A bit of a hack ...
 */
static int yy_did_buffer_switch_on_eof;

void yyrestart YY_PROTO(( FILE *input_file ));

void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
void yy_load_buffer_state YY_PROTO(( void ));
YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
#define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )

YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str ));
YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));

static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
static void yy_flex_free YY_PROTO(( void * ));

#define yy_new_buffer yy_create_buffer

#define yy_set_interactive(is_interactive) \
      { \
      if ( ! yy_current_buffer ) \
            yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
      yy_current_buffer->yy_is_interactive = is_interactive; \
      }

#define yy_set_bol(at_bol) \
      { \
      if ( ! yy_current_buffer ) \
            yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
      yy_current_buffer->yy_at_bol = at_bol; \
      }

#define YY_AT_BOL() (yy_current_buffer->yy_at_bol)


#define YY_USES_REJECT
typedef unsigned char YY_CHAR;
FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
typedef int yy_state_type;
extern char yytext[];


static yy_state_type yy_get_previous_state YY_PROTO(( void ));
static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
static int yy_get_next_buffer YY_PROTO(( void ));
static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));

/* Done after the current pattern has been matched and before the
 * corresponding action - sets up yytext.
 */
#define YY_DO_BEFORE_ACTION \
      yytext_ptr = yy_bp; \
      yyleng = (int) (yy_cp - yy_bp); \
      yy_hold_char = *yy_cp; \
      *yy_cp = '\0'; \
      if ( yyleng >= YYLMAX ) \
            YY_FATAL_ERROR( "token too large, exceeds YYLMAX" ); \
      yy_flex_strncpy( yytext, yytext_ptr, yyleng + 1 ); \
      yy_c_buf_p = yy_cp;

#define YY_NUM_RULES 64
#define YY_END_OF_BUFFER 65
static yyconst short int yy_acclist[1379] =
    {   0,
       55,   55,   55,   55,   55,   55,   55,   55,   65,   63,
       64,   55,   63,   64,   62,   64,   63,   64,   63,   64,
        6,   63,   64,   59,   63,   64,   59,   63,   64,   63,
       64,   60,   63,   64,   61,   63,   64,   59,   63,   64,
       62,   63,   64,   63,   64,   58,   63,   64,   58,   63,
       64,   59,   63,   64,   59,   63,   64,   59,   63,   64,
       53,   63,   64,   63,   64,   54,   63,   64,16422,   54,
       63,   64,16422,   54,   63,   64,16422,   54,   63,   64,
    16422,   54,   63,   64,16422,   54,   63,   64,16422,   54,
       63,   64,16422,   54,   63,   64,16422,   54,   63,   64,

    16422,   54,   63,   64,16422,   54,   63,   64,16422,   54,
       63,   64,16422,   54,   63,   64,16422,   54,   63,   64,
    16422,   54,   63,   64,16422,   59,   63,   64,   48,   62,
       64,16429,16430,   63,   64,   47,   59,   63,   64,   47,
       59,   63,   64,   47,   59,   63,   64,   44,   62,   63,
       64,16429,16430,   63,   64,   42,   58,   63,   64,   42,
       58,   63,   64,   63,   64,   48,   62,   63,   64,16429,
    16430,   47,   59,   63,   64,   43,   47,   59,   63,   64,
       47,   59,   63,   64,   63,   64,   47,   59,   63,   64,
       51,   60,   63,   64,   52,   61,   63,   64,   50,   62,

       63,   64,   37,   62,   64,   63,   64,   36,   59,   63,
       64,   36,   59,   63,   64,   34,   60,   63,   64,   35,
       61,   63,   64,   36,   59,   63,   64,   33,   62,   63,
       64,   63,   64,   22,   58,   63,   64,16415,   22,   58,
       63,   64,16415,   37,   62,   63,   64,   36,   59,   63,
       64,   36,   59,   63,   64,   36,   59,   63,   64,   32,
       53,   63,   64,   63,   64,   54,   63,   64,16422,   54,
       63,   64,16422,   54,   63,   64,16422,   54,   63,   64,
    16422,   54,   63,   64,16422,   54,   63,   64,16422,   54,
       63,   64,16422,   54,   63,   64,16422,   54,   63,   64,

    16422,   54,   63,   64,16422,   54,   63,   64,16422,   54,
       63,   64,16422,   54,   63,   64,16422,   54,   63,   64,
    16422,   54,   63,   64,16422,   54,   63,   64,16422,   36,
       59,   63,   64,   64,   16,   64,   17,   64,   15,   64,
       18,   64,   14,   64,    9,   64,    7,   64,    9,   64,
       55,   59,   56,   58,   58,   58,   58,   58,   53,   62,
    16422,   49,   54,16422,   54,16422,   54,16422,   54,16422,
       54,16422,   54,16422,   54,16422,   54,16422,   54,16422,
       54,16422,   54,16422,   54,16422,   54,16422,   54,16422,
       54,16422,   54,16422,   54,16422,   54,16422,   54,16422,

       54,16422,   54,16422,   54,16422,   54,16422,   54,16422,
       54,16422,   54,16422,   54,16422,   54,16422,   54,16422,
       54,16422,16429,16430, 8238, 8238, 8238, 8238, 8238, 8238,
     8238, 8238, 8238, 8238,   47,   59,   42,   58,   42,   58,
       42,   58,   42,   58,   41,   42,   58,   40,   40,   48,
       62,16429,16430,   36,   59,   22,   58,16415,   22,   58,
    16415,   22,   58,16415,   29, 8223, 8223,   28,   22,   58,
    16415, 8223, 8223, 8223,   26,   23,   22,   58,16415,   24,
       27, 8223,   32,   53,   37,   62,   32,   32,   54,16422,
       32,   32,   32,   32,16422,   32,   54,16422,   54,16422,

       54,16422,   54,16422,   54,16422,   54,16422,   54,16422,
       54,16422,   54,16422,   54,16422,   54,16422,   54,16422,
       54,16422,   54,16422,   54,16422,   54,16422,   54,16422,
       54,16422,   54,16422,   54,16422,   54,16422,   54,16422,
       54,16422,   54,16422,   54,16422,   54,16422,   54,16422,
       54,16422,   54,16422,   14,    8,   57,   58,   58,   53,
     8230, 8230,   54,16422,   54,16422,   54,16422,   54,16422,
       54,16422,   54,16422,   54,16422,   54,16422,   54,16422,
       54,16422,   54,16422,   54,16422,   54,16422,   54,16422,
        2,   54,16422,   54,16422,   54,16422,   54,16422,   54,

    16422,   54,16422,   54,16422,   54,16422,   54,16422,   54,
    16422,   54,16422,   54,16422,   54,16422,   54,16422,   54,
    16422,   54,16422, 8238, 8237, 8238, 8238, 8238, 8238, 8237,
     8238, 8238, 8238, 8238, 8238, 8238, 8238, 8238, 8238, 8238,
     8238, 8238, 8238, 8238, 8238, 8238,   39,   39,   42,   58,
       42,   58,   40,   40,   40,   26,   22,   58,16415,   22,
       58,16415,   32,   53,   54,16422,   30, 8230,   30, 8230,
       54,16422,   54,16422,   54,16422,   54,16422,   54,16422,
       54,16422,   54,16422,   54,16422,   54,16422,   54,16422,
       54,16422,   54,16422,   54,16422,    2,   54,16422,   54,

    16422,   54,16422,   54,16422,   54,16422,   54,16422,   54,
    16422,   54,16422,   54,16422,   54,16422,   54,16422,   54,
    16422,   54,16422,   54,16422,   54,16422,   54,16422,   14,
       58,   58, 8230, 8230, 8230, 8230, 8230,16422,   49,   54,
    16422,16404,16405,16422,   49,16404,16405,   54,16422,   54,
    16422,   54,16422,   54,16422,   54,16422,   54,16422,   54,
    16422,   54,16422,   54,16422,   54,16422,   54,16422,    2,
       54,16422,   54,16422,   54,16422,   54,16422,   54,16422,
       54,16422,   54,16422,   54,16422,   54,16422,   54,16422,
       54,16422,   54,16422,   54,16422,    4,   54,16422, 8238,

     8238, 8237, 8238, 8237, 8237, 8238, 8238, 8238, 8238, 8238,
     8238, 8238, 8238, 8238, 8238, 8238, 8238, 8238, 8238, 8238,
       42,   58,   39,   39,   39,   42,   58,   40,   40,   22,
       58,16415,   22,   26,   58,16415,   22,   58,16415,16422,
       32,   32,   49,   32,   32,   32,   32,   30, 8230,   30,
       30, 8230,   30, 8230,   54,16422,   54,16422,   54,16422,
       54,16422,   54,16422,   54,16422,   54,16422,   54,16422,
       54,16422,   54,16422,   54,16422,   54,16422,   54,16422,
       54,16422,   54,16422,   54,16422,   54,16422,   54,16422,
       54,16422,   54,16422,   54,16422,   54,16422,   54,16422,

       54,16422,   54,16422,    4,   54,16422,16404,16405,16404,
    16405,    1, 8230, 8230, 8230, 8230, 8230, 8230, 8230,   54,
    16422, 8212, 8212, 8213,16404,16405,   54,16422,   54,16422,
       54,16422,   54,16422,   54,16422,   54,16422,   54,16422,
       54,16422,   54,16422,   19,   54,16422,   54,16422,   54,
    16422,   54,16422,   54,16422,   54,16422,   54,16422,   54,
    16422,16422,   49, 8238, 8238, 8238, 8238, 8238, 8238, 8238,
     8238, 8238, 8238, 8238, 8238, 8238, 8237, 8238, 8238, 8238,
     8238, 8238, 8238, 8238, 8238, 8238, 8238, 8238,   39,   39,
       40,   40,   25,   25,   25,   25,   25,   25, 8223,   22,

       58,16415,   22,   58,16415, 8230, 8230,   30, 8230,   30,
     8230,   54,16422,   54,16422,   54,16422,   54,16422,   54,
    16422,   54,16422,   54,16422,   54,16422,   54,16422,   54,
    16422,   19,   54,16422,   54,16422,   54,16422,   54,16422,
       54,16422,   54,16422,   54,16422,   54,16422,   19, 8230,
     8230, 8230, 8230, 8230, 8230, 8230, 8230, 8230,   54,16422,
     8212, 8212, 8212, 8213,   54,16422,   54,16422,   54,16422,
       54,16422,   54,16422,   19,16404,16405,16422,   19,   49,
    16404,16405,   54,16422,    3,   54,16422,   54,16422,   54,
    16422,   54,16422,16422,   49,16422,   10,   49, 8238, 8238,

     8238, 8238, 8238, 8238, 8238,   39,   39,   25,   25,   25,
       25,   25,   25,   25,   25,   25,   25,   25,   25,   25,
       25,   22,   58,16415, 8230, 8230, 8230, 8230, 8230,   30,
     8230,   30, 8230,   54,16422,   54,16422,   54,16422,   54,
    16422,   54,16422,   54,16422,   54,16422,    3,   54,16422,
       54,16422,   54,16422,   54,16422,   19,16404,16405,   19,
    16404,16405, 8230, 8230, 8230, 8230, 8230, 8230, 8230,   54,
    16422, 8212, 8212, 8213,    5,   54,16422,   54,16422,   54,
    16422,   19,16404,16405,   54,16422,   54,16422,   54,16422,
    16422,   11,   49, 8230, 8230,   10, 8238, 8238, 8238,   25,

       25,   25,   25,   25,   25,   25,   25, 8230, 8230, 8230,
     8230, 8230,   54,16422,    5,   54,16422,   54,16422,   54,
    16422,   54,16422,   54,16422,   54,16422, 8230, 8230, 8230,
     8230,   54,16422, 8212, 8212,   54,16422, 8230, 8230,   11,
     8230, 8230, 8230, 8230, 8230,   25,   25,   25,   25,   25,
       25,   25,   25, 8230, 8230, 8230, 8230,   54,16422,   54,
    16422,   13,   13,   13,   13,   13,   13,   13,   13,   13,
       13,   13,   13,   13, 8230, 8230,   54,16422, 8230, 8230,
     8230, 8230, 8230, 8230, 8230, 8230, 8230, 8230,   25, 8230,
     8230,   54,16422,   54,16422, 8230, 8230, 8230, 8230, 8230,

     8230, 8230, 8230, 8230,   25,   54,16422,   13,   13,   13,
       13,   13,   13,   13,   13,   13,   13,   13,   13,   13,
       13,   13,   13,   13,   13,   13,   13,   13,   13,   13,
       13,   13,   13,16422,   49, 8230, 8230, 8230, 8230, 8230,
     8230,16422,   12,   49, 8230, 8230,   13,   13,   13,   13,
       13,   13,   13,   13,   13,   13,   13,   13,   13, 8230,
     8230,   12, 8230, 8230, 8230, 8230, 8230, 8230, 8230, 8230,
     8230, 8230, 8230, 8230, 8230, 8230, 8230, 8230
    } ;

static yyconst short int yy_accept[1505] =
    {   0,
        1,    2,    3,    4,    5,    6,    7,    8,    9,    9,
        9,    9,    9,    9,    9,   10,   12,   15,   17,   19,
       21,   24,   27,   30,   32,   35,   38,   41,   44,   46,
       49,   52,   55,   58,   61,   64,   66,   70,   74,   78,
       82,   86,   90,   94,   98,  102,  106,  110,  114,  118,
      122,  126,  129,  134,  136,  140,  144,  148,  154,  156,
      160,  164,  166,  172,  176,  181,  185,  187,  191,  195,
      199,  203,  206,  208,  212,  216,  220,  224,  228,  232,
      234,  239,  244,  248,  252,  256,  260,  264,  266,  270,
      274,  278,  282,  286,  290,  294,  298,  302,  306,  310,

      314,  318,  322,  326,  330,  334,  335,  337,  339,  341,
      343,  345,  347,  349,  351,  352,  353,  353,  353,  353,
      353,  353,  353,  353,  353,  353,  354,  354,  354,  354,
      354,  354,  354,  354,  354,  354,  354,  355,  356,  356,
      356,  356,  356,  357,  358,  358,  358,  359,  359,  360,
      360,  361,  362,  363,  365,  365,  365,  367,  369,  371,
      373,  375,  377,  379,  381,  383,  385,  387,  389,  391,
      393,  395,  397,  399,  401,  403,  405,  407,  409,  411,
      413,  415,  417,  419,  421,  423,  425,  425,  425,  425,
      425,  425,  425,  426,  427,  428,  429,  430,  431,  432,

      433,  434,  435,  437,  437,  439,  441,  443,  445,  446,
      446,  448,  448,  448,  448,  449,  450,  454,  456,  456,
      459,  462,  465,  465,  465,  466,  467,  468,  469,  472,
      472,  473,  474,  475,  476,  476,  476,  477,  480,  481,
      482,  482,  483,  485,  485,  487,  487,  488,  489,  491,
      492,  493,  494,  494,  495,  496,  497,  499,  501,  503,
      505,  507,  509,  511,  513,  515,  517,  519,  521,  523,
      525,  527,  529,  531,  533,  535,  537,  539,  541,  543,
      545,  547,  549,  551,  553,  555,  556,  556,  557,  557,
      557,  557,  557,  557,  557,  557,  557,  557,  557,  557,

      557,  557,  557,  557,  557,  557,  557,  557,  557,  557,
      557,  557,  557,  557,  557,  557,  557,  558,  558,  559,
      560,  560,  561,  561,  561,  561,  561,  562,  563,  563,
      563,  565,  567,  569,  571,  573,  575,  577,  579,  581,
      583,  585,  587,  589,  591,  594,  596,  598,  600,  602,
      604,  606,  608,  610,  612,  614,  616,  618,  620,  622,
      624,  624,  624,  624,  624,  624,  624,  624,  624,  624,
      624,  624,  624,  624,  624,  625,  627,  627,  627,  628,
      629,  630,  630,  630,  630,  632,  633,  633,  634,  634,
      635,  636,  637,  638,  639,  640,  641,  642,  643,  644,

      645,  646,  647,  647,  647,  647,  648,  649,  649,  651,
      653,  654,  655,  655,  656,  656,  657,  657,  657,  657,
      657,  657,  657,  657,  657,  657,  657,  657,  660,  660,
      660,  660,  660,  663,  663,  665,  665,  667,  667,  667,
      667,  667,  669,  671,  673,  675,  677,  679,  681,  683,
      685,  687,  689,  691,  693,  695,  697,  700,  702,  704,
      706,  708,  710,  712,  714,  716,  718,  720,  722,  724,
      726,  728,  730,  730,  731,  731,  731,  731,  731,  731,
      731,  731,  731,  731,  731,  731,  731,  731,  731,  731,
      731,  731,  731,  731,  731,  731,  731,  731,  731,  731,

      731,  731,  731,  732,  733,  734,  735,  735,  736,  736,
      736,  736,  737,  738,  739,  740,  740,  742,  745,  748,
      750,  752,  754,  756,  758,  760,  762,  764,  766,  768,
      770,  771,  773,  775,  777,  779,  781,  783,  785,  787,
      789,  791,  793,  795,  797,  800,  800,  800,  800,  800,
      800,  800,  800,  800,  800,  800,  800,  800,  800,  800,
      801,  801,  801,  801,  801,  802,  802,  804,  805,  806,
      806,  806,  806,  806,  807,  807,  808,  809,  810,  811,
      812,  813,  814,  815,  816,  817,  818,  819,  820,  821,
      821,  823,  824,  825,  825,  826,  826,  828,  828,  828,

      829,  830,  830,  833,  833,  833,  833,  833,  833,  833,
      833,  833,  833,  833,  833,  833,  837,  840,  841,  841,
      842,  843,  844,  845,  846,  847,  848,  850,  851,  853,
      853,  855,  855,  857,  859,  861,  863,  865,  867,  869,
      871,  873,  875,  877,  879,  881,  883,  885,  887,  889,
      891,  893,  895,  897,  899,  901,  903,  905,  908,  910,
      912,  912,  912,  912,  912,  912,  912,  912,  912,  912,
      912,  912,  912,  912,  912,  912,  912,  912,  912,  913,
      913,  913,  913,  913,  913,  913,  913,  913,  913,  914,
      915,  916,  917,  917,  918,  918,  918,  918,  918,  918,

      919,  920,  920,  922,  922,  922,  923,  924,  925,  927,
      929,  931,  933,  935,  937,  939,  941,  943,  945,  948,
      950,  952,  954,  956,  958,  960,  962,  963,  964,  965,
      966,  967,  968,  969,  970,  971,  972,  973,  974,  975,
      976,  977,  977,  977,  977,  977,  977,  977,  978,  978,
      979,  980,  981,  982,  983,  984,  985,  986,  987,  988,
      989,  989,  989,  990,  991,  991,  992,  993,  993,  993,
      993,  994,  995,  995,  995,  995,  995,  996,  997,  997,
      997,  997,  997,  998,  999,  999,  999, 1000, 1003, 1006,
     1006, 1006, 1006, 1006, 1006, 1007, 1008, 1008, 1008, 1008,

     1010, 1012, 1014, 1016, 1018, 1020, 1022, 1024, 1026, 1028,
     1030, 1032, 1035, 1037, 1039, 1041, 1043, 1045, 1047, 1049,
     1049, 1049, 1049, 1049, 1049, 1049, 1049, 1049, 1049, 1049,
     1049, 1049, 1049, 1049, 1049, 1049, 1049, 1050, 1050, 1050,
     1050, 1050, 1050, 1051, 1052, 1052, 1052, 1053, 1054, 1055,
     1056, 1056, 1057, 1057, 1057, 1057, 1058, 1059, 1061, 1062,
     1063, 1063, 1064, 1064, 1065, 1065, 1067, 1069, 1071, 1073,
     1075, 1079, 1083, 1085, 1088, 1090, 1092, 1094, 1095, 1096,
     1096, 1097, 1098, 1099, 1099, 1099, 1099, 1099, 1099, 1099,
     1099, 1099, 1099, 1099, 1099, 1099, 1099, 1099, 1099, 1099,

     1099, 1100, 1101, 1102, 1103, 1104, 1105, 1106, 1106, 1107,
     1108, 1109, 1110, 1111, 1111, 1112, 1113, 1113, 1113, 1114,
     1115, 1116, 1116, 1117, 1117, 1117, 1118, 1119, 1120, 1120,
     1121, 1122, 1122, 1122, 1122, 1122, 1125, 1126, 1127, 1127,
     1128, 1128, 1128, 1128, 1129, 1130, 1130, 1132, 1134, 1136,
     1138, 1140, 1142, 1144, 1146, 1148, 1151, 1153, 1155, 1157,
     1157, 1157, 1157, 1157, 1157, 1157, 1157, 1157, 1157, 1157,
     1157, 1157, 1157, 1157, 1157, 1157, 1157, 1157, 1157, 1157,
     1157, 1160, 1163, 1163, 1163, 1163, 1163, 1163, 1163, 1164,
     1165, 1165, 1165, 1166, 1167, 1168, 1169, 1169, 1170, 1170,

     1172, 1172, 1172, 1173, 1174, 1174, 1175, 1178, 1180, 1182,
     1185, 1187, 1189, 1191, 1191, 1192, 1193, 1194, 1194, 1194,
     1194, 1194, 1194, 1194, 1194, 1195, 1196, 1196, 1197, 1197,
     1197, 1197, 1197, 1197, 1197, 1197, 1198, 1199, 1200, 1200,
     1200, 1201, 1202, 1202, 1202, 1203, 1204, 1204, 1204, 1205,
     1206, 1206, 1206, 1207, 1208, 1208, 1208, 1209, 1210, 1211,
     1212, 1212, 1213, 1213, 1215, 1218, 1220, 1222, 1224, 1226,
     1228, 1228, 1228, 1228, 1228, 1228, 1228, 1228, 1228, 1228,
     1228, 1228, 1228, 1228, 1228, 1228, 1228, 1228, 1228, 1228,
     1228, 1228, 1228, 1228, 1228, 1228, 1228, 1229, 1230, 1230,

     1230, 1231, 1232, 1234, 1234, 1235, 1236, 1238, 1238, 1238,
     1238, 1238, 1239, 1240, 1240, 1241, 1242, 1243, 1243, 1244,
     1244, 1244, 1244, 1245, 1246, 1246, 1246, 1246, 1246, 1247,
     1248, 1248, 1249, 1250, 1250, 1251, 1252, 1253, 1254, 1254,
     1254, 1255, 1256, 1256, 1256, 1257, 1258, 1260, 1262, 1263,
     1264, 1265, 1266, 1267, 1268, 1269, 1270, 1271, 1272, 1273,
     1274, 1275, 1275, 1275, 1275, 1275, 1275, 1275, 1275, 1275,
     1275, 1275, 1275, 1275, 1275, 1275, 1275, 1275, 1275, 1275,
     1275, 1275, 1275, 1275, 1275, 1275, 1275, 1275, 1275, 1276,
     1277, 1279, 1280, 1281, 1281, 1282, 1282, 1282, 1282, 1283,

     1284, 1284, 1284, 1285, 1286, 1287, 1288, 1288, 1289, 1289,
     1290, 1290, 1291, 1292, 1294, 1294, 1294, 1294, 1294, 1294,
     1294, 1294, 1294, 1294, 1294, 1294, 1294, 1294, 1294, 1294,
     1294, 1294, 1294, 1294, 1294, 1294, 1294, 1294, 1294, 1294,
     1294, 1294, 1294, 1294, 1294, 1294, 1294, 1294, 1294, 1294,
     1294, 1294, 1294, 1294, 1294, 1294, 1294, 1294, 1294, 1294,
     1294, 1294, 1296, 1296, 1296, 1297, 1298, 1299, 1300, 1300,
     1301, 1301, 1301, 1302, 1303, 1303, 1303, 1304, 1305, 1306,
     1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1309, 1310,
     1311, 1312, 1313, 1314, 1315, 1316, 1317, 1318, 1319, 1320,

     1321, 1322, 1323, 1324, 1325, 1326, 1327, 1328, 1329, 1330,
     1331, 1332, 1333, 1334, 1334, 1334, 1334, 1334, 1334, 1334,
     1334, 1334, 1334, 1334, 1334, 1334, 1334, 1334, 1334, 1334,
     1334, 1335, 1336, 1336, 1337, 1338, 1338, 1338, 1339, 1340,
     1340, 1341, 1342, 1342, 1342, 1342, 1342, 1342, 1342, 1342,
     1342, 1342, 1342, 1342, 1342, 1342, 1342, 1342, 1342, 1342,
     1342, 1342, 1342, 1342, 1342, 1342, 1342, 1342, 1342, 1342,
     1342, 1342, 1342, 1342, 1342, 1342, 1342, 1342, 1342, 1342,
     1342, 1342, 1342, 1342, 1342, 1342, 1342, 1342, 1343, 1344,
     1345, 1345, 1345, 1345, 1345, 1346, 1347, 1347, 1347, 1347,

     1347, 1347, 1347, 1347, 1347, 1347, 1347, 1347, 1347, 1347,
     1347, 1348, 1349, 1350, 1351, 1352, 1353, 1354, 1355, 1356,
     1357, 1358, 1359, 1360, 1360, 1360, 1360, 1360, 1360, 1360,
     1360, 1360, 1360, 1360, 1361, 1362, 1362, 1363, 1363, 1363,
     1363, 1363, 1363, 1363, 1363, 1363, 1363, 1363, 1363, 1363,
     1363, 1363, 1363, 1363, 1363, 1363, 1363, 1363, 1364, 1365,
     1365, 1366, 1366, 1366, 1366, 1367, 1368, 1368, 1368, 1368,
     1368, 1368, 1368, 1368, 1368, 1368, 1368, 1368, 1369, 1370,
     1371, 1372, 1372, 1373, 1373, 1373, 1373, 1373, 1373, 1373,
     1373, 1374, 1375, 1375, 1375, 1376, 1377, 1377, 1377, 1377,

     1378, 1379, 1379, 1379
    } ;

static yyconst int yy_ec[256] =
    {   0,
        1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    2,    4,    5,    6,    1,    7,    8,    9,   10,
       11,    7,   12,   13,   14,   15,   16,   17,   18,   19,
       20,   21,   22,   20,   20,   20,   23,   24,   25,   26,
       27,   28,    1,   29,   34,   35,   36,   37,   38,   39,
       40,   41,   42,   43,   44,   45,   46,   47,   48,   49,
       50,   51,   52,   53,   54,   55,   55,   56,   57,   55,
       30,   31,   32,    7,   33,    1,   34,   35,   36,   37,

       38,   39,   40,   41,   42,   43,   44,   45,   46,   47,
       48,   49,   50,   51,   52,   53,   54,   55,   55,   56,
       57,   55,    1,   58,    1,   33,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,

        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1
    } ;

static yyconst int yy_meta[59] =
    {   0,
        1,    2,    3,    4,    1,    1,    4,    4,    1,    5,
        6,    7,    8,    9,   10,   11,   12,   12,   12,   12,
       12,   12,   12,   13,    1,    4,    5,    4,    1,   14,
        1,    1,   15,   16,   16,   16,   16,   17,   16,   15,
       15,   15,   15,   15,   18,   19,   15,   15,   15,   15,
       15,   20,   15,   15,   15,   21,   15,    4
    } ;

static yyconst short int yy_base[1666] =
    {   0,
        0,    0,   56,    0,   75,   79,  114,    0,  172,    0,
      221,    0,   62,   63, 5763, 9290, 5760, 9290,  252, 5756,
     9290, 9290, 5752, 5750,   59, 9290,  288, 9290,  218,  327,
       56,   35, 5724,   72, 5720, 5701,  290,  330,  341,  351,
      364,  365,  377,  378,  401,  414,  415,  456,  416,  425,
      438, 5686,  506, 5716, 9290, 5734,  549,    0,  556,  565,
      248,   91,    0,   83, 5713,  215, 5692, 5680,  276, 9290,
     9290, 9290, 5710, 9290, 5728,    0, 9290,  575, 9290,  594,
      620,  258, 9290,  218, 5706,  219, 5699, 5680,  677,  734,
      414,  425,  317,  249,  392,  339,  203,  289,  234,  407,

      454,  431,  435,  607, 5668, 9290, 9290, 9290, 9290, 9290,
     5695, 9290, 9290, 5677, 5721, 9290, 5675,  203,  240,  307,
     5679, 5678,  422, 5666, 5713, 9290, 5708,  286,  462,  578,
      385,  620,  638,  481,  643,  677, 5681,    0, 5673,  632,
     5660, 5675,  691,  699,  352,  317, 9290,    0, 5682, 5679,
     9290,  504, 9290,  507,  791, 5677,  722,  729,  724,  713,
      743,  756,  772,  794,  815,  817,  821,  827,  833,  828,
      854,  863,  865,  867,  896,  877,  878,  900,  907,  919,
      912,  926,  938,  942,  949,    0,  946,  997, 1006,  983,
     1053, 5651, 5676, 5675,  366,  571,  633,  742,  367,  457,

      792,  376, 9290, 1013, 5669,  456,  495,  580,  713,  408,
     5679,    0, 1067, 1082,  844,  917,    0, 9290, 1095, 5667,
      480, 1115,  894, 5674, 9290, 9290, 5691, 9290, 5657,  783,
      424, 5667,  578,  975,  518,  976, 9290, 1172, 9290, 9290,
        0, 5635, 5661, 5658, 9290, 5662, 9290, 5680, 1229,  604,
     5660,  632, 5652, 5622,  876, 1286, 1312,  560,  436,  621,
      285,  706,  553,  729,  305,  643,  657,  741,  730,  767,
      749,  784,  716,  836,  684,  792,  825,  615,  905,  870,
      804, 5629,  918,  827,  921, 5647, 5644, 9290, 5628, 5618,
     5639, 5621, 5637, 5625, 5635, 5630, 5620, 5619, 5627,  896,

     5615,    0,  920, 5631, 1009, 1024, 1080, 1053, 1131, 1117,
     1133, 5624, 5612, 5613, 5601,  996, 1029, 1172, 1184, 5611,
     5623, 5622,    0, 1048, 1229, 1243, 1111, 1172, 1080, 5621,
     1265, 1272, 1319, 1321, 1323, 1325, 1335, 1354, 1358, 1356,
     1365, 1372, 1388, 1394, 1398, 1407, 1417, 1428, 1430, 1444,
     1446, 1462, 1467, 1473, 1477, 1483, 1488, 1506, 1512, 1519,
     5605, 1000, 1010, 1076, 5608, 5605, 1106, 5593, 1551, 1533,
     1598, 5589, 1653, 5617, 9290, 5635, 1160, 5604, 1036, 5614,
     1080, 1146, 1708,    0, 5582, 5609, 5606, 5607, 5604, 1115,
      790, 1121,  956, 1178, 1008, 1181, 1145, 1195, 1223, 1186,

     1190, 1047, 1158, 1560, 1541, 1239, 1450, 1610, 1627, 1195,
     1665, 1675, 1215, 9290,    0, 9290, 1257, 1266, 1277, 1687,
     1765, 5579, 1523, 1708, 1820, 5578, 1720, 1873, 1742, 1728,
     1930, 5577, 1985, 5600, 5599, 5598, 2042, 2099,    0, 1753,
     1773, 2122, 5573, 2177, 2234, 1601, 5574, 1239, 1222, 1377,
     1264, 1759, 1804, 1180, 1287, 1105, 1799, 1457, 1797, 1798,
     1815, 1813,  527, 1236, 1816, 1300,  917, 1817, 1184, 1818,
     1750, 1873, 5595, 5594, 1522, 1334, 1476, 1507, 1895, 1387,
     1896, 1367, 1443, 1597, 1910, 1582, 1440, 1346, 5593, 1346,
     1803, 1628, 1687, 1380, 1403, 1889, 1832, 1753, 5581, 5585,

     5569, 1916, 1941, 9290, 1950, 1960, 1318, 9290,    0, 2042,
     2058, 1869, 1995, 1964, 5589, 2291, 2085, 2322, 2348, 2080,
     2015, 2124, 2126, 2128, 2172, 2170, 2184, 2188, 2186, 2222,
     1665, 2241, 2245, 2243, 2272, 2256, 2325, 2346, 2351, 2362,
     2380, 2381, 2385, 2395, 2396, 5572, 5559, 5580, 5562, 5578,
     5566, 5576, 5571, 5561, 5560, 5567, 1270, 5554, 2433, 5593,
     5561, 1408, 2488,    0, 5538, 1437, 9290, 5587, 5535, 2208,
     2543, 2598, 5558, 5557, 5556, 5555, 1537, 5556, 1333, 1432,
     1498, 1567, 1501, 1152, 1727, 1376, 1605,  890, 1647, 2299,
     2410, 2445, 2455, 1581, 9290,    0, 5561, 1626, 2467, 2488,

     5539, 2500, 2653, 1833, 2710, 1862,    0, 2146, 2732, 2171,
        0, 2210, 2754, 2252,    0, 2776, 2833, 2411,   70, 5551,
     1590, 5550, 1877, 2890, 1889, 1469, 1464, 5579, 1503, 1687,
     5578,    0, 2921, 2978, 1736, 1881, 5534, 1608, 1992, 1236,
     1559, 1617, 1994, 2010, 1502, 1802, 1885, 1760, 2375, 1814,
     1789, 2038, 1678, 1990, 2003, 1543, 2084, 5533, 2082,    0,
     5532, 5539, 5530, 5537, 5524, 5535, 5533, 5535, 5515, 5527,
     5528,  511, 1703, 5533, 3036, 2120, 2468, 2254, 9290, 2514,
     2515, 2136, 5527, 5524, 5505, 2083, 1750, 2512, 2519, 5509,
     2555, 2562, 1766, 9290,    0, 3093, 3114, 1849, 2627, 2670,

     2838, 3135, 2601, 2720, 2569, 2379, 2401, 5514,    0, 2691,
     2676, 2806, 2799, 2686, 2863, 2867, 2869, 2916, 2687, 2928,
     2930, 2876, 2932, 2943, 2942, 2985, 2997, 2326, 5488, 9290,
     5492, 5496, 5482, 5480, 5474, 5470, 5460, 5460, 5448, 5429,
     5443, 1932, 2740, 3156, 3211, 3012, 3266, 9290, 3321, 1883,
     2036, 1911, 2059, 1935, 2067, 2068, 1984, 1985, 1915, 2127,
     2094, 3079, 3101, 5438, 3122, 3168, 9290, 3378, 3177, 3184,
     3400, 5423, 2606, 3455, 3240, 3278, 3477, 5422, 2653, 3532,
     3287, 3294, 3554, 5414, 2822, 3609, 3321, 3649, 5403, 3706,
     3737, 2167, 3343, 3341, 3768, 3823, 3857, 2196, 3364, 3386,

     1657, 3888, 3945, 1795,  959, 2167, 2098, 2018, 2049, 2226,
     2129, 2777, 2186, 2114, 2240, 2110, 2209, 2233, 2818, 5402,
     5417, 5406, 5398, 5373, 5388, 5350, 2298, 4002, 5365, 1747,
     4052, 2653, 2373, 2735, 2954, 2776, 2294, 5359, 2328, 3210,
     2995, 3407, 3414, 9290, 2283, 3441, 3463, 5341, 4094, 4116,
     4143, 5353, 4159, 4184, 3484, 4202, 5327, 3324, 3519, 3541,
     2319, 9290,    0, 5344, 5341, 3438, 3518, 2991, 3578, 3241,
     4257, 4283, 3592, 3585, 3614, 3615, 3679, 3709, 3250, 2958,
     3740, 9290, 3486, 4309, 3347, 3565, 5326, 5329, 5310, 5317,
     5298, 5309, 5303, 5295, 5265, 5272, 5272, 3776, 4337, 4392,

     2428, 2366, 2316, 2414, 2349, 2467, 2464, 3797, 3809, 9290,
     2828, 2497, 2964, 2582, 2501, 9290,    0, 3220, 2975, 2546,
     3128, 2583, 2602,    0, 3328, 3238, 2611, 3318, 2615, 2640,
     9290,    0, 3367, 3489, 4449, 4471, 4513, 4535, 4562, 5277,
     4578, 4603, 3831, 4621, 5245, 3864, 3889, 5294, 4676, 4733,
     5242, 2616, 1943, 2015, 2428, 5230, 2589, 2653, 2586, 5228,
     5240, 5226, 4790, 3885, 5209, 2815, 2790, 2674, 5209, 5188,
     2847, 5169, 3240, 3344, 4840, 5189, 3436, 3625, 3571, 3751,
     2597,    0, 5166, 3743, 3839, 3863, 3923, 3919, 3945, 9290,
     4887, 3959, 3966, 4903, 4932, 4954, 4981, 5178, 4997, 3672,

     2695, 3990, 4000, 5159, 5169, 5163, 3774, 4117, 4182,    0,
     4225, 4140, 4226, 3578, 4118, 9290, 3999, 5035, 3741, 4024,
     5065, 2846, 3798, 5094, 5124, 5179, 5223, 3582, 5136, 5154,
     5145, 5142, 5118, 5126, 5099, 2734, 2926, 2775, 2873, 4269,
     2922, 3165, 2927, 4349, 3159, 3469, 2997, 4356, 3169, 3541,
     5246, 4365, 5268, 5081, 5313, 5358, 5370, 5382, 5416, 5443,
     5470, 5482, 5489, 5533, 5590, 5072, 5086, 5074, 5063, 5058,
     5045, 5009, 5029, 4995, 5007, 4965, 4960, 4943, 4884, 4870,
     4782, 2725, 4738, 3412, 5647, 3414, 5696, 4736, 3499, 3832,
     4230, 4305, 4722, 4121, 4208, 4392, 4408, 4700, 5735, 4415,

     4471, 5751, 4513, 4435, 4569, 9290, 4494,    0, 3015, 4379,
     5794, 5824, 5879, 5923, 3710, 5945, 5981, 6008, 3919, 6029,
     3092, 6057, 4592, 4532, 4648, 4595, 4462, 4650, 3441, 3316,
     4676, 3891, 3325, 4690, 4514, 3587, 4517, 4603,    0, 3212,
     3307, 6069, 6081, 6093, 6105, 4429, 4350, 4350, 4308, 9290,
     4303, 4246, 4207, 4189, 4136, 4124, 4091, 4081, 4003, 3936,
     3932,    0, 4030, 2367, 3476, 3997, 3615, 2856, 3222, 4304,
     2294,    0, 4031, 2511, 3648, 4109, 3741, 3333, 3477, 4682,
     2883, 3690, 6097, 3008, 4235, 4720, 3912, 4756, 4778, 3867,
     4756, 6152, 6188, 6215, 4183, 6236, 3398, 6264, 4951, 4945,

     6276, 6288, 6300, 3813, 6312, 6339, 6366, 4226, 6373, 4630,
     6401, 6413, 6425, 3792, 3734, 3726, 3669, 3615, 3438, 3417,
     3414, 3269, 3238, 3225, 3171, 2520, 2787, 3566, 2169, 3603,
     2348, 3669, 3559, 3161, 3701, 3611, 3814, 2922, 3755, 3095,
     3743, 3130, 3771, 3291, 3775, 3699, 3789, 3881, 3913, 3983,
     3116, 3968, 6447, 6497, 3320, 4523, 4740, 4900, 4995, 5010,
     3122, 4601, 6544, 6556, 6568, 3064, 6580, 6607, 6634, 4239,
     6641, 6678, 6707, 4312, 6727, 6739, 6751, 2969, 4677, 3440,
     2949, 2942, 2881, 2867, 2684, 2490, 2421, 3357, 2410, 3885,
     2822, 3958, 3572, 4093, 3533, 4121, 3486, 4124, 3647, 3825,

     3661, 2342, 4140, 3865, 4141, 4158, 4142, 3924, 4206, 3495,
     4183, 3901, 4231,    0, 4648, 4234, 4373, 4469, 4264, 4360,
     4365, 4704, 3791,    0, 2253, 2134, 2088, 2051, 2047, 4120,
     4805, 4414, 6772, 6801, 4547, 6821, 6833, 6845, 1884, 6857,
     6869, 4626, 1836, 1694, 1590, 4181, 3823, 4217, 3960, 3534,
     4213, 4262, 3897, 4391, 4282, 4410, 4316, 4288, 4414, 4428,
     3999, 4445, 4449, 3962, 4409, 4307, 4411, 4561, 4482, 4468,
     3608, 4473, 4516, 4505, 4626, 4587, 4614, 4649, 4683, 4478,
     1429, 1383, 1238, 1121, 5068, 4787, 4660, 5118, 9290, 5070,
     6891, 5099, 5102, 6911, 6923, 4723, 4452, 4528, 4689, 4613,

     3184, 4685, 1464, 4739, 4723, 4773, 4735, 3759, 4748, 1968,
     4752, 1107, 4642, 4358, 4673, 4777, 4784, 4782, 4785, 4707,
     4790, 4781, 4801,  907,  880,  796,  733, 5148, 5104,    0,
     4926, 5130, 6944, 6974, 7029, 7073, 4953, 4880, 4895, 4868,
     4882, 4929, 4871, 4789, 4948, 4884, 4950, 4956, 4990, 5007,
     4911, 4926, 5029, 4992,  641, 2611,  570, 7095, 7131, 7158,
     5078, 7179, 4932, 7207, 5160, 5170, 4937, 4977, 5010, 4994,
     5042, 5030, 2759,  446, 4560, 7219, 7231, 7243,  337, 7255,
     7282, 7309, 5128, 7316, 5066, 5123, 5044,  231,  186, 7353,
     7382, 5161, 7402, 7414, 7426,   62, 4306,   14, 7438, 7450,

     5175, 4654, 9290, 7473, 7494, 7515, 7522, 7535, 7555, 7570,
     7574, 7594, 7604, 7618, 5156, 5140, 7639, 7660, 7673, 7683,
     5154, 7698, 5190, 5195, 7701, 7721, 7732, 5211, 7743, 5197,
     7747, 7768, 7788, 7809, 7819, 7840, 7847, 7861, 7882, 5219,
     7892, 7910, 7922, 7937, 7949, 7969, 5220, 5237, 7982, 8003,
     8013, 8034, 5227, 8046, 8056, 5243, 5259, 5250, 8073, 8084,
     8095, 8107, 8128, 8148, 8169, 8185, 8206, 8220, 5265, 5281,
     8232, 8253, 8273, 8293, 5272, 5283, 5295, 8314, 8335, 8345,
     5296, 5299, 5310, 8355, 5325, 5327, 5333, 8373, 5336, 5314,
     5340, 8393, 8409, 8430, 8446, 5352, 8456, 5353, 5351, 8474,

     8494, 8506, 8516, 8537, 5399, 8547, 5400, 8557, 8574, 8592,
     8610, 8629, 5417, 8649, 8666, 8687, 8701, 5433, 8711, 8729,
     8749, 5434, 5398, 8759, 8780, 8800, 8821, 8831, 8851, 5440,
     5455, 8870, 5441, 5457, 8889, 5468, 5501, 8909, 8929, 8950,
     8971, 8992, 9008, 9029, 9049, 5507, 9059, 9077, 9087, 5524,
     5411, 9107, 5539, 5456, 9126, 5543, 5518, 9145, 9164, 9185,
     9206, 9227, 9247, 5541, 9268
    } ;

static yyconst short int yy_def[1666] =
    {   0,
     1503,    1,    1,    3,    1,    1, 1503,    7, 1503,    9,
        9,   11, 1504, 1504, 1503, 1503, 1503, 1503, 1503, 1505,
     1503, 1503, 1503, 1506, 1507, 1503, 1503, 1503, 1503, 1503,
       30, 1503, 1503, 1503, 1508, 1503, 1509, 1509, 1509, 1509,
     1509, 1509, 1509, 1509, 1509, 1509, 1509, 1509, 1509, 1509,
     1509, 1503, 1503,   19, 1503, 1503,   27,   53, 1503, 1503,
       60, 1510,   53, 1503, 1503, 1503, 1503, 1503, 1507, 1503,
     1503, 1503,   19, 1503, 1503,   69, 1503,   27, 1503, 1503,
     1503,   81, 1503, 1503, 1503, 1503, 1511, 1503, 1512, 1512,
       90,   90,   90,   90,   90,   90,   90,   90,   90,   90,

       90,   90,   90,   90, 1503, 1503, 1503, 1503, 1503, 1503,
     1513, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503,
     1503, 1503, 1503, 1503, 1505, 1503, 1506, 1514, 1514, 1514,
     1514, 1514, 1514, 1514, 1514, 1503,   30,   31, 1503, 1503,
     1503, 1503, 1503, 1503, 1503, 1515, 1503, 1516, 1508, 1517,
     1503, 1503, 1503, 1509, 1503, 1518, 1509, 1509, 1509, 1509,
     1509, 1509, 1509, 1509, 1509, 1509, 1509, 1509, 1509, 1509,
     1509, 1509, 1509, 1509, 1509, 1509, 1509, 1509, 1509, 1509,
     1509, 1509, 1509, 1509, 1509,   53, 1503,   53, 1503, 1503,
     1503,  191, 1519, 1520, 1520, 1520, 1520, 1520, 1520, 1520,

     1520, 1520, 1503, 1503,   60,   60, 1521, 1521, 1522, 1523,
     1503, 1524, 1503, 1503, 1525, 1525,   53, 1503, 1503,   81,
       81, 1503, 1503, 1503, 1503, 1503, 1503, 1503,  222, 1526,
     1503, 1503, 1503, 1527, 1528, 1529, 1503, 1503, 1503, 1503,
     1530, 1503, 1531, 1532, 1503, 1503, 1503, 1503, 1533, 1503,
      155, 1503, 1534, 1503, 1503, 1503, 1533,  257,  257,  257,
      257,  257,  257,  257,  257,  257,  257,  257,  257,  257,
      257,  257,  257,  257,  257,  257,  257,  257,  257,  257,
      257,  257,  257,  257,  257, 1535, 1536, 1503, 1503, 1503,
     1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503,

     1503, 1537, 1538, 1539, 1538, 1538, 1538, 1538, 1538, 1538,
     1538, 1503, 1503, 1503, 1503, 1540, 1503, 1503, 1503, 1541,
     1542, 1542,  155,  155, 1503, 1503, 1543, 1543, 1544, 1545,
     1545, 1546, 1546, 1546, 1546, 1546, 1546, 1546, 1546, 1546,
     1546, 1546, 1546, 1546, 1546, 1546, 1546, 1546, 1546, 1546,
     1546, 1546, 1546, 1546, 1546, 1546, 1546, 1546, 1546, 1546,
     1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503,
     1503,  371, 1503, 1503, 1503, 1503, 1503,  373, 1503, 1503,
     1503, 1547, 1503, 1548, 1503, 1549, 1550, 1551, 1552, 1551,
     1551, 1551, 1551, 1551, 1551, 1551, 1551, 1551, 1551, 1551,

     1551, 1551, 1553, 1503, 1503, 1554, 1554, 1503, 1503, 1555,
     1503, 1503, 1556, 1503, 1557, 1503, 1558, 1559, 1560, 1503,
     1503,  421, 1559, 1503, 1503,  425, 1503, 1503, 1561, 1503,
     1503,  431, 1503, 1562, 1562, 1563, 1563, 1503,  438, 1503,
     1503, 1503,  442, 1564, 1564,  445,  445,  445,  445,  445,
      445,  445,  445,  445,  445,  445,  445,  445,  445,  445,
      445,  445,  445,  445,  445,  445,  445,  445,  445,  445,
      445,  445, 1565, 1565, 1503, 1503, 1503, 1503, 1503, 1503,
     1503, 1503, 1503, 1503, 1503, 1503, 1503, 1566, 1567, 1567,
     1568, 1568, 1568, 1568, 1568, 1568, 1568, 1503, 1503, 1503,

     1503, 1503, 1503, 1503, 1503, 1503, 1569, 1503, 1570, 1503,
     1503, 1571, 1571, 1572, 1572, 1572, 1573, 1574, 1574, 1573,
     1573, 1573, 1573, 1573, 1573, 1573, 1573, 1573, 1573, 1573,
     1503, 1573, 1573, 1573, 1573, 1573, 1573, 1573, 1573, 1573,
     1573, 1573, 1573, 1573, 1573, 1503, 1503, 1503, 1503, 1503,
     1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503,
      559, 1575, 1503, 1576, 1503, 1577, 1503, 1503, 1503, 1503,
     1503, 1503, 1578, 1578, 1579, 1579, 1580, 1580, 1580, 1580,
     1580, 1580, 1580, 1580, 1580, 1580, 1580, 1580, 1580, 1503,
     1503, 1503, 1503, 1581, 1503, 1582, 1503, 1583, 1503, 1503,

     1584, 1503, 1503, 1503, 1503, 1503, 1585, 1503, 1503, 1503,
     1586, 1503, 1503, 1503, 1587, 1503, 1503, 1588, 1588, 1588,
     1588, 1588, 1588, 1588, 1588, 1588, 1589, 1503, 1589, 1590,
     1503, 1591, 1592, 1592,  634,  634,  634,  634,  634,  634,
      634,  634,  634,  634,  634,  634,  634,  634,  634,  634,
      634,  634,  634,  634,  634,  634,  634,  634,  519,  519,
     1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503,
     1503, 1503, 1593, 1594, 1503, 1595, 1595, 1595, 1503, 1595,
     1595, 1595, 1503, 1503, 1503, 1503, 1596, 1503, 1503, 1597,
     1503, 1503, 1598, 1503, 1599, 1600, 1600,  697, 1600,  697,

      697,  697, 1601, 1503, 1503, 1602, 1602, 1603,  519, 1601,
     1601, 1601, 1601, 1601, 1601, 1601, 1601, 1601, 1601, 1601,
     1601, 1601, 1601, 1601, 1601, 1601, 1604, 1604, 1503, 1503,
     1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503,
     1503, 1605, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1606,
     1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606,
     1607, 1503, 1503, 1608, 1503, 1503, 1503, 1503, 1503, 1503,
     1503,  771, 1609, 1503, 1503, 1503, 1503,  777, 1610, 1503,
     1503, 1503, 1503,  783, 1611, 1503, 1503, 1503,  788, 1612,
     1612,  791,  791, 1612,  791,  791, 1612, 1613, 1503, 1503,

     1614, 1615, 1615,  803,  803,  803,  803,  803,  803,  803,
      803,  803,  803,  803,  803,  803,  803,  803,  803, 1503,
     1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1616, 1616,
     1503, 1617, 1617, 1617, 1617, 1617, 1503, 1503, 1503, 1604,
     1604, 1503, 1503, 1503, 1618, 1503, 1503, 1619, 1620, 1620,
     1620, 1620, 1620, 1620, 1620, 1620,  856, 1621, 1503, 1503,
     1622, 1503, 1623, 1624, 1625, 1621, 1621, 1621, 1621, 1621,
     1626, 1626, 1621, 1621, 1621, 1621, 1621, 1627, 1627, 1604,
     1604, 1503, 1604, 1604, 1604, 1604, 1503, 1503, 1503, 1503,
     1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503,

     1628, 1628, 1628, 1628, 1628, 1628, 1628, 1503, 1503, 1503,
     1629, 1503, 1629, 1630, 1503, 1503, 1631, 1503, 1632, 1503,
     1632, 1633, 1503, 1634, 1503, 1635, 1503, 1635, 1636, 1503,
     1503, 1637, 1503, 1503, 1503, 1503, 1638, 1638, 1638, 1638,
     1638, 1638, 1638, 1638,  944, 1503, 1503, 1503, 1639, 1639,
      950,  950,  950,  950,  950,  950,  950,  950,  950, 1503,
     1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503,
     1503, 1503, 1640, 1641, 1503, 1642, 1643, 1643, 1643, 1643,
      872,  872, 1503, 1627, 1627, 1604, 1604, 1503, 1503, 1503,
     1644, 1644, 1644, 1644, 1644, 1644, 1644, 1644, 1644, 1645,

     1646, 1503, 1503, 1647, 1648, 1648, 1645, 1645, 1645,  872,
     1645, 1645, 1645, 1627, 1627, 1503, 1627, 1627, 1627, 1627,
     1604, 1021, 1021, 1604, 1021, 1021, 1021, 1604, 1503, 1503,
     1503, 1503, 1503, 1503, 1503, 1649, 1649, 1649, 1650, 1503,
     1651, 1652, 1653, 1503, 1654, 1655, 1656, 1503, 1657, 1658,
     1503, 1503, 1503, 1053,  944, 1055, 1055, 1055, 1055, 1055,
     1055, 1055, 1058, 1659, 1659, 1065, 1065, 1065, 1065, 1065,
     1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503,
     1503, 1503, 1503, 1660, 1660, 1661, 1661, 1662, 1662, 1663,
     1663, 1663, 1503, 1627, 1627, 1644, 1644, 1644, 1644, 1644,

     1644, 1644, 1645, 1503, 1503, 1503, 1645, 1018, 1018, 1018,
     1627, 1018, 1018, 1018, 1627, 1604, 1604, 1027, 1604, 1604,
     1027, 1027, 1027, 1027, 1503, 1503, 1503, 1503, 1650, 1503,
     1503, 1653, 1503, 1503, 1656, 1503, 1503, 1503, 1664, 1055,
     1055, 1055, 1055, 1055, 1055, 1063, 1065, 1065, 1503, 1503,
     1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503,
     1503, 1085, 1085, 1660, 1660, 1660, 1660, 1660, 1660, 1660,
     1660, 1087, 1087, 1661, 1661, 1661, 1661, 1661, 1661, 1661,
     1661, 1662, 1662, 1503, 1663, 1663, 1503, 1644, 1644, 1644,
     1645, 1627, 1627, 1114, 1627, 1627, 1114, 1114, 1114, 1114,

     1027, 1027, 1027, 1120, 1027, 1027, 1027, 1604, 1120, 1664,
     1055, 1055, 1055, 1065, 1503, 1503, 1503, 1503, 1503, 1503,
     1503, 1503, 1503, 1503, 1503, 1660, 1660, 1660, 1660, 1660,
     1660, 1660, 1660, 1660, 1660, 1660, 1660, 1660, 1661, 1661,
     1661, 1661, 1661, 1661, 1661, 1661, 1661, 1661, 1661, 1661,
     1661, 1662, 1662, 1503, 1503, 1503, 1663, 1663, 1663, 1663,
     1503, 1645, 1114, 1114, 1114, 1196, 1114, 1114, 1114, 1627,
     1196, 1604, 1604, 1604, 1027, 1027, 1027, 1209, 1503, 1065,
     1503, 1503, 1503, 1503, 1503, 1503, 1503, 1660, 1660, 1660,
     1660, 1660, 1660, 1660, 1660, 1660, 1660, 1660, 1660, 1660,

     1661, 1661, 1661, 1661, 1661, 1661, 1661, 1661, 1661, 1661,
     1661, 1661, 1661, 1253, 1253, 1662, 1662, 1662, 1662, 1662,
     1662, 1662, 1662, 1254, 1662, 1503, 1503, 1503, 1503, 1503,
     1665, 1665, 1627, 1627, 1627, 1114, 1114, 1114, 1271, 1027,
     1027, 1604, 1503, 1503, 1503, 1660, 1660, 1660, 1660, 1660,
     1660, 1660, 1660, 1660, 1660, 1660, 1661, 1661, 1661, 1661,
     1661, 1661, 1661, 1661, 1661, 1661, 1661, 1662, 1662, 1662,
     1662, 1662, 1662, 1662, 1662, 1662, 1662, 1662, 1662, 1662,
     1503, 1503, 1503, 1503, 1665, 1665, 1665, 1665, 1503, 1665,
     1665, 1665, 1665, 1114, 1114, 1627, 1660, 1660, 1660, 1660,

     1660, 1660, 1660, 1661, 1661, 1661, 1661, 1661, 1661, 1661,
     1662, 1662, 1662, 1662, 1662, 1662, 1662, 1662, 1662, 1662,
     1662, 1662, 1662, 1503, 1503, 1503, 1503, 1665, 1665, 1391,
     1391, 1391, 1665, 1391, 1391, 1391, 1665, 1660, 1660, 1660,
     1661, 1661, 1661, 1662, 1662, 1662, 1662, 1662, 1662, 1662,
     1662, 1662, 1662, 1662, 1503, 1503, 1503, 1665, 1665, 1436,
     1665, 1665, 1436, 1436, 1436, 1436, 1662, 1662, 1662, 1662,
     1662, 1662, 1662, 1503, 1503, 1436, 1436, 1436, 1462, 1436,
     1436, 1436, 1665, 1462, 1662, 1662, 1662, 1503, 1503, 1665,
     1665, 1665, 1436, 1436, 1436, 1484, 1503, 1503, 1436, 1436,

     1665, 1503,    0, 1503, 1503, 1503, 1503, 1503, 1503, 1503,
     1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503,
     1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503,
     1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503,
     1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503,
     1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503,
     1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503,
     1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503,
     1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503,
     1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503,

     1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503,
     1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503,
     1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503,
     1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503,
     1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503,
     1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503,
     1503, 1503, 1503, 1503, 1503
    } ;

static yyconst short int yy_nxt[9349] =
    {   0,
       16,   17,   18,   19,   20,   21,   22,   23,   24,   25,
       26,   27,   28,   27,   29,   22,   30,   31,   31,   31,
       31,   31,   31,   16,   28,   32,   33,   34,   35,   16,
       36,   16,   37,   38,   39,   40,   41,   42,   43,   44,
       37,   45,   46,   37,   47,   37,   37,   37,   48,   49,
       50,   37,   51,   37,   37,   37,   37,   52,   53,   54,
      116,  116,   55,   56,  113,  113, 1502,   57,   58,   57,
       59,   55,   60,   61,   61,   61,   61,   61,   61,   62,
       63,   64,   65,   66,   69,   70,   67,   71,   69,   70,
     1503,   71,  114,  114,  129,  130,  620,  131,  116,  116,

      132,  437,  213,  133,  213,  214, 1501,  215,  203,  203,
      134, 1503,  135,   68,   16,   17,   72,   73,   20,   21,
       74,   75,   24,   76,   77,   78,   79,   78,   80,   74,
       81,   82,   82,   82,   82,   82,   82,   16,   83,   84,
       85,   86,   87,   16,   88,   16,   89,   90,   91,   92,
       93,   94,   95,   96,   97,   98,   99,   97,  100,   97,
       97,   97,  101,  102,  103,   97,  104,   97,   97,   97,
       97,  105,  106,  106,  106,  106,  106,  106,  106,  106,
      106,  107,  108,  106,  109,  106,  106,  106,  106,  106,
      106,  106,  106,  106,  106,  106,  106,  106,  110,  106,

      106,  106,  106,  106,  111,  111,  111,  111,  111,  111,
      111,  111,  111,  111,  111,  111,  111,  111,  111,  111,
      111,  111,  111,  111,  111,  111,  111,  111,  111,  106,
      106,  106, 1498,  106,  143,  143,  143,  143,  143,  143,
      143,  203,  203,  218,  218,  218,  218,  106,  249,  249,
      290,  291,  275,  106,  106,  106,  106,  106,  106,  106,
      106,  106,  106,  106,  106,  106,  106,  106,  106,  106,
      106,  106,  106,  106,  106,  106,  106,  106,  116,  249,
      249,  292, 1503, 1497,  266,  117,  118,  119,  293,  120,
      121,  152, 1503,  267,  249,  249,  122,  268,  302,  153,

      123,  124,  136, 1503,  137,  138,  138,  138,  138,  138,
      138,  129,  130, 1503,  131,  304,  155,  132,  448,  156,
      133,  117,  118,  119,  273,  120,  139,  134,  318,  135,
      318,  152,  122,  249,  274,  249,  140,  124,  141,  153,
      142,  144,  152,  138,  138,  138,  138,  138,  138,  138,
      153,  294,  152,  249,  265,  295,  155,  452,  159,  156,
      153,  145,  249,  249,  146,  152,  152,  155,  317,  317,
      156,  147,  271,  153,  153,  157,  158,  155,  152,  152,
      156, 1492,  148,  272,  249,  249,  153,  153,  160,  161,
      155,  155,  162,  156,  156,  389,  389,  302,  163,  164,

      166,  165,  152,  155,  155,  389,  156,  156,  397,  167,
      153,  171,  390,  168,  304,  152,  152,  152,  169,  408,
      170,  408,  172,  153,  153,  153,  152,  155,  402,  307,
      156,  259,  175,  269,  153,  270,  173,  249,  249,  152,
      155,  155,  155,  156,  156,  156,  174,  153,  276,  226,
      226,  155,  249,  249,  156,  298,  176,  152,  446,  249,
      249,  260,  261,  299,  155,  153,  262,  156,  182,  300,
      249,  249,  263,  264,  302,  184,  249,  249,  183,  185,
      249,  249,  155,  282,  249,  156,  389,  277,  283,  177,
     1503,  304, 1488,  302,  278,  279,  178,  179,  398,  249,

      249,  280,  305,  180,  281,  152,  181,  186,  152,  187,
      304, 1503,  827,  153, 1503,  188,  153,  189,  209,  189,
      190,  310,  191,  192,  192,  192,  192,  192,  192,  427,
      155,  427,  403,  155,  193, 1503,  156,  828,  194,  195,
      196,  197,  194,  198,  199,  194,  194,  194,  194,  194,
      200,  194,  194,  194,  201,  202,  194,  194,  194,  194,
      194,  194,  194,  204,  649,  205,  206,  206,  206,  206,
      206,  206,  207,  207,  207,  207,  207,  207,  207,  208,
      249,  206,  206,  206,  206,  206,  206,  206,  209,  219,
      302,  220,  221,  221,  221,  221,  221,  221,  450,  145,

      389,  249,  210,  209,  226,  226,  445,  304,  249,  211,
      222,  222,  222,  222,  222,  222,  222,  210,  391,  392,
      212,  223, 1475,  224,  225,  306,  226,  227,  228,  247,
      247,  226,  302,  226,  229,  226,  221,  221,  221,  221,
      221,  221,  221,  230,  284,  231,  232,  233,  285,  304,
      302,  679,  249,  249,  145,  302,  234,  235,  247,  247,
      236,  237,  389,  249,  238,  298,  308,  304,  239,  249,
      240,  465,  304,  299,  393,  241,  447,  242,  152,  300,
      246,  394,  313,  247,  248,  309,  153,  453,  247,  311,
      247,  249,  247,  143,  143,  143,  143,  143,  143,  143,

      462,  454,  250,  251,  252,  249,  253,  143,  143,  143,
      143,  143,  143,  143,  152,  143,  143,  143,  143,  143,
      143,  143,  153,  152,  404,  152,  404,  405,  316,  406,
      152,  153,  249,  153,  254,  255,  146,  246,  153,  155,
      247,  248,  156,  153,  152,  247,  334,  247,  155,  247,
      155,  156,  153,  156,  249,  155,  449,  152,  156,  250,
      256,  252,  451,  253,  249,  153,  460,  456,  335,  155,
      332,  389,  156,  152,  455,  333,  336,  249,  249,  257,
      258,  153,  155, 1457,  419,  156,  395,  457,  457,  249,
      396,  254,  323,  458,  420,  152,  420,  249,  155,  421,

      324,  156,  325,  153,  325,  326,  337,  327,  328,  328,
      328,  328,  328,  328,  329,  249,  152,  338,  152,  389,
      155,  389,  152,  156,  153,  399,  153,  339,  152,  152,
      153,  459,  249,  400,  152, 1456,  153,  153,  463,  401,
      249,  155,  153,  155,  156,  578,  156,  155,  345,  345,
      156,  468,  249,  155,  155,  152,  156,  156,  412,  155,
      343,  341,  156,  153,  152,  342,  152,  340,  152,  461,
      344,  464,  153,  249,  153,  249,  153,  255,  152,  152,
      155,  413,  471,  156,  249,  153,  153,  153,  414,  155,
      679,  155,  156,  155,  156,  223,  156,  152,  346,  415,

      349,  152,  438,  155,  155,  153,  156,  156,  152,  153,
      347,  466,  350,  152,  467,  348,  153,  230,  249,  389,
      152,  153,  155,  351,  352,  156,  155,  152,  153,  156,
      418,  412,  302,  155,  236,  153,  156,  485,  155,  152,
      486,  156,  447,  152,  335,  155,  759,  153,  156,  304,
      152,  153,  155,  249,  413,  156,  353, 1455,  153,  356,
      354,  414,  470,  355,  155,  472,  249,  156,  155,  249,
      249,  156, 1503,  653,  357,  155,  423,  429,  156,  361,
      362,  363,  358,  364,  365,  389,  424,  430,  424,  430,
      366,  425,  431,  360,  367,  368,  447,  359, 1503,  373,

      373,  373,  373,  373,  373,  373,  580,  502,  369,  502,
      369,  370,  249,  371,  372,  372,  372,  372,  372,  372,
      190,  302,  191,  192,  192,  192,  192,  192,  192,  207,
      207,  207,  207,  207,  207,  207,  302,  389,  304,  361,
      362,  363,  491,  364,  365,  317,  317,  547,  548, 1503,
      366,  549,  582,  304,  367,  368,  374, 1503,  550,  375,
      376,  375,  375,  377,  375,  302,  375,  378,  375,  192,
      192,  192,  192,  192,  192,  192,  389,  492,  379,  380,
      381,  214,  304,  215,  216,  216,  216,  216,  216,  216,
      382,  510,  302,  510,  511,  589,  512,  383,  411,  411,

      411,  411,  411,  411,  411,  494,  375,  375,  384,  304,
      385,  222,  222,  222,  222,  222,  222,  222,  224,  225,
      551,  226,  227,  228,  552,  506,  226,  493,  226,  302,
      226,  222,  222,  222,  222,  222,  222,  222, 1089,  555,
      231,  232,  233,  302,  389,  302,  304,  556,  507,  644,
      389,  416,  417,  557,  579,  508,  237,  570,  249,  570,
      304,  577,  304,  239,  496,  240,  509,  568, 1427,  590,
      377,  590,  242,  223,  389,  224,  225,  495,  226,  227,
      228,  389,  584,  226,  497,  226,  506,  226,  319,  319,
      319,  319,  319,  319,  319,  230,  756,  231,  232,  233,

      319,  319,  319,  319,  319,  319,  319,  389,  234,  507,
      389,  581,  236,  237,  583,  389,  508,  569,  209,  389,
      239,  642,  240,  578,  389,  655,  599, 1503,  599,  242,
      152,  587,  246,  249,  588,  247,  248,  249,  153,  597,
      247,  585,  247,  326,  247,  327,  328,  328,  328,  328,
      328,  328,  389,  593,  250,  251,  252,  637,  253,  505,
      505,  505,  505,  505,  505,  505,  514,  423,  602,  586,
      602,  808,  650,  152,  515,  249,  594,  424,  419,  424,
      249,  153,  425,  595, 1426,  636,  254,  439,  420,  249,
      420,  516,  249,  421,  596,  324,  331,  440,  155,  440,

      441,  156,  442,  443,  443,  443,  443,  443,  443,  329,
      639,  739,  247,  152,  740,  246,  517,  249,  247,  248,
      518,  153,  152,  247,  518,  247,  518,  247,  519,  688,
      153,  688,  519,  643,  519,  659,  518,  250,  251,  252,
      249,  253,  521,  660,  519,  155,  652,  155,  156,  155,
      156,  155,  156,  249,  156,  152,  672,  152,  675,  518,
      444,  155,  389,  153,  156,  153,  152,  519,  659,  254,
      523,  522,  520,  518,  153,  674,  660,  490,  152,  751,
      155,  519,  155,  156,  155,  156,  153,  156,  659,  518,
      679,  155,  302,  526,  156,  518,  660,  519,  155,  152,

      531,  156,  524,  519,  525,  389,  527,  153,  152,  304,
      531,  667,  757,  528,  155,  302,  153,  156,  152,  743,
      155,  743,  531,  156,  155,  638,  153,  156,  665,  152,
      249,  152,  304,  155,  529, 1425,  156,  153,  530,  153,
      532,  659,  680,  155,  659,  152,  156,  518,  746,  660,
      746,  533,  660,  153,  155,  519,  155,  156,  152,  156,
      535,  389, 1424,  518,  593,  628,  153,  752,  152,  534,
      155,  519,  155,  156,  518,  156,  153,  659,  518,  345,
      476,  671,  519,  536,  152,  660,  519,  594,  155,  518,
      645,  156,  153,  155,  595,  830,  156,  519,  537,  155,

      437,  798,  156,  155,  628, 1503,  156,  152,  659,  155,
      249, 1440,  156,  152,  155,  153,  660,  156,  538,  539,
      152,  153,  662,  659,  423,  541,  620,  389,  153,  542,
      389,  660,  155,  540,  424,  156,  424,  813,  155,  425,
      630,  156,  663,  543,  753,  155,  249,  755,  156,  559,
      559,  559,  559,  559,  559,  559,  545,  592,  592,  592,
      592,  592,  592,  592,  544,  370,  389,  371,  372,  372,
      372,  372,  372,  372,  405,  661,  406,  407,  407,  407,
      407,  407,  407,  659,  361,  362,  363,  249,  364,  365,
      750,  660,  762,  819,  762,  366,  389,  620,  659,  367,

      368,  374,  152,  249,  375,  560,  660,  809,  754,  375,
      153,  375,  561,  375,  372,  372,  372,  372,  372,  372,
      372,  437,  635,  379,  380,  381,  409,  409,  409,  409,
      409,  409,  409,  668,  389,  562, 1150,  765,  670,  765,
      302,  806,  563,  409,  409,  409,  409,  409,  409,  409,
      209,  758,  249,  564,  249,  565,  374,  304,  628,  375,
      376,  249,  677,  377,  375,  810,  375,  531,  375,  373,
      373,  373,  373,  373,  373,  373,  389,  531,  379,  380,
      381,  411,  411,  411,  411,  411,  411,  411,  760,  531,
      566,  411,  411,  411,  411,  411,  411,  411,  799,  302,

      799,  948,  598,  421,  422,  422,  422,  422,  422,  422,
      385,  374,  413,  672,  375,  376,  304,  817,  377,  375,
      678,  375,  249,  375,  425,  426,  426,  426,  426,  426,
      426, 1150,  674,  379,  380,  381,  428,  428,  428,  428,
      428,  428,  428,  429,  431,  432,  432,  432,  432,  432,
      432,  152,  457,  430,  659,  430,  389,  973,  431,  153,
      152,  842,  660,  842,  578,  385,  604,  441,  153,  442,
      443,  443,  443,  443,  443,  443,  457,  846,  830,  846,
      249,  422,  422,  422,  422,  422,  422,  422,  605,  627,
      627,  627,  627,  627,  627,  627,  640,  683,  152,  152,

      152,  531,  657,  249,  249,  152,  153,  153,  153,  606,
      605,  531,  249,  153,  152,  302,  152,  152,  152,  152,
      607,  608,  153,  531,  153,  153,  153,  153,  447,  648,
      816,  646,  304,  249,  604,  814,  426,  426,  426,  426,
      426,  426,  426,  609,  302,  641,  249,  447,  249,  457,
      249,  249,  249,  676,  647,  656,  605,  249,  249,  654,
      330,  304,  330,  604,  610,  609,  249,  651,  249,  249,
      249,  249,  330,  682,  152,  611,  224,  225,  605,  226,
      227,  228,  153,  692,  226,  605,  226, 1150,  226,  428,
      428,  428,  428,  428,  428,  428,  659,  659,  231,  232,

      233,  302,  620,  620,  660,  660,  693,  605,  437,  416,
      658,  659,  389,  694,  237,  620,  620,  804,  304,  660,
      437,  239,  457,  240,  695,  249,  249,  901, 1396,  249,
      242,  612,  503,  503,  503,  503,  503,  503,  503,  681,
      389,  664,  666,  898,  389,  898,  432,  432,  432,  432,
      432,  432,  432,  613,  907,  903,  669,  503,  503,  503,
      503,  503,  503,  503,  389,  514,  505,  505,  505,  505,
      505,  505,  505,  515,  614,  613,  505,  505,  505,  505,
      505,  505,  505,  905, 1067,  615,  223,  687,  224,  225,
      516,  226,  227,  228,  249,  331,  226,  507,  226,  490,

      226,  433,  433,  433,  433,  433,  433,  433,  230,  692,
      231,  232,  233,  389,  389, 1443,  152,  578,  433,  433,
      433,  616,  433,  433,  153,  236,  237,  818,  807,  617,
      811,  345,  693,  239,  249,  240,  249,  578,  249,  694,
      447,  155,  242,  618,  156,  619,  812,  249,  620,  621,
     1503,  622,  447,  620,  249,  620,  511,  620,  512,  513,
      513,  513,  513,  513,  513,  389,  249,  623,  624,  625,
      952,  249,  902,  437,  691,  691,  691,  691,  691,  691,
      691,  152,  249,  659,  840,  727,  152, 1384,  389,  153,
      447,  660,  841,  728,  153,  904,  389,  389, 1383,  626,

      439,  953,  249,  906,  578,  908,  155,  908,  324,  156,
      440,  155,  440,  441,  156,  442,  443,  443,  443,  443,
      443,  443,  329,  628,  710,  152,  703,  152,  249,  152,
      679,  447,  302,  153, 1382,  153,  629,  153,  443,  443,
      443,  443,  443,  443,  443,  957, 1503,  608,  302,  304,
      155,  249,  155,  156,  155,  156,  389,  156,  956,  630,
      711,  713,  447,  249,  578,  304,  631,  249,  436,  609,
      712,  152,  608,  152, 1381,  836,  436,  632,  152,  153,
      246,  153,  249,  247,  248,  152,  153,  152,  247,  152,
      247,  609,  247,  153,  609,  153,  155,  153,  155,  156,

      830,  156,  250,  251,  252,  715,  253,  946,  714,  946,
      155,  612,  155,  156,  155,  156,  609,  156,  951, 1291,
      249,  633,  718,  152,  571,  571,  571,  571,  571,  571,
      571,  153,  716,  613,  254,  518,  717,  246,  955,  249,
      247,  248,  152,  519,  152,  247,  152,  247,  155,  247,
      153,  156,  153,  612,  153,  613,  958,  518,  719,  250,
      251,  252,  249,  253, 1503,  519,  302,  155,  959,  155,
      156,  155,  156,  152,  156,  613,  720,  954,  721,  249,
      345,  153,  155,  304, 1089,  156,  249,  634,  345,  722,
      457,  254,  696,  249,  988,  981,  988,  613,  155,  827,

      697,  156,  698,  982,  698,  699,  833,  700,  701,  701,
      701,  701,  701,  701,  702,  591,  591,  591,  591,  591,
      591,  591,  331,  518,  828,  830,  152,  886,  882,  984,
     1002,  519, 1002,  704,  153,  704,  705,  985,  706,  707,
      707,  707,  707,  707,  707,  389, 1238,  152,  155,  709,
      882,  155,  152,  578,  156,  153,  885, 1503,  335,  704,
      153,  704,  705,  152,  706,  707,  707,  707,  707,  707,
      707,  153,  155,  490, 1503,  156,  518,  155,  389,  830,
      156,  152,  152,  679,  519,  302,  152,  723,  155,  153,
      153,  156, 1293,  860,  153,  389,  727,  152,  830,  578,

     1037,  724,  304,  335,  728,  153,  155,  155,  815,  156,
      156,  155,  618, 1226,  156,  860,  861,  725,  335,  249,
      622,  155,  155,  862,  156,  156,  591,  591,  591,  591,
      591,  591,  591,  209,  863,  726,  374,  790,  861,  375,
      560,  830,  437,  389,  375,  862,  375,  578,  375,  559,
      559,  559,  559,  559,  559,  559, 1503,  389,  379,  380,
      381,  592,  592,  592,  592,  592,  592,  592, 1345, 1068,
      742,  592,  592,  592,  592,  592,  592,  592, 1503,  249,
      302, 1036,  761,  600,  600,  600,  600,  600,  600,  600,
      565,  374,  594,  389,  375,  560,  389,  304,  912,  375,

      578,  375,  912,  375,  600,  600,  600,  600,  600,  600,
      600, 1038,  832,  379,  380,  381,  603,  603,  603,  603,
      603,  603,  603, 1150,  679, 1503,  302,  302,  689,  689,
      689,  689,  689,  689,  689,  689,  689,  689,  689,  689,
      689,  689,  490,  304,  304,  565,  374,  920,  916,  375,
      376,  830,  916,  377,  375,  834,  375, 1239,  375,  571,
      571,  571,  571,  571,  571,  571, 1288,  835,  379,  380,
      381,  691,  691,  691,  691,  691,  691,  691,  691,  691,
      691,  691,  691,  691,  691,  859,  859,  859,  859,  859,
      859,  859,  845, 1040, 1044, 1040, 1044,  916,  981,  693,

      385,  374,  152,  920,  375,  376,  982,  604,  377,  375,
      153,  375,  927,  375,  572,  572,  572,  572,  572,  572,
      572,  679, 1069,  379,  380,  381, 1048,  155, 1048,  605,
      156,  572,  572,  572,  572,  572,  572,  249, 1070,  858,
      249,  927,  749,  849,  849,  849,  849,  849,  849,  849,
      918,  605, 1474,  916,  608,  385,  224,  225,  331,  226,
      227,  228,  931, 1066,  226,  302,  226,  249,  226,  603,
      603,  603,  603,  603,  603,  603,  609,  152,  231,  232,
      233,  330,  304,  330,  850,  153,  701,  152,  871,  416,
      977,  931,  152,  330,  237,  153,  872,  925,  609,  447,

      153,  239,  155,  240,  249,  156, 1104,  851, 1104,  335,
      242,  768,  155,  155,  852,  156,  156,  155, 1076,  335,
      156,  769, 1077,  769,  770,  853,  771,  772,  772,  772,
      772,  772,  772,  774,  705, 1344,  706,  707,  707,  707,
      707,  707,  707,  775,  866,  775,  776,  302,  777,  778,
      778,  778,  778,  778,  778,  780,  744,  744,  744,  744,
      744,  744,  744,  389,  304,  781, 1159,  781,  782, 1160,
      783,  784,  784,  784,  784,  784,  784,  786,  871,  224,
      225,  978,  226,  227,  228,  578,  872,  787,  302,  787,
     1089,  226,  788,  789,  789,  789,  789,  789,  789,  230,

      152,  231,  232,  233,  389,  304, 1487,  152,  153,  433,
      433,  433,  616,  433,  433,  153,  236,  237,  830,  878,
      617,  578,  980,  612,  239,  155,  240,  879,  156,  912,
      249, 1074,  155,  242,  223,  156,  224,  225, 1075,  226,
      227,  228, 1289,  335,  226,  613,  226,  880,  226,  330,
      867,  330,  850,  830,  701,  880,  230, 1348,  231,  232,
      233,  330, 1072, 1073,  152, 1039,  933,  613,  152,  234,
      152,  249,  153,  236,  237,  851,  153,  152,  153,  916,
     1080,  239,  852,  240, 1128,  153, 1128,  830, 1081,  155,
      242,  791,  156,  155, 1082,  155,  156, 1233,  156,  792,

     1150,  793,  155,  793,  794,  156,  795,  796,  796,  796,
      796,  796,  796,  797,  490,  868,  620,  152, 1150,  869,
      870,  437,  152,  912,  246,  153,  345,  247,  248,  152,
      153,  152,  247,  152,  247, 1251,  247,  153, 1131,  153,
     1131,  153,  155,  152,  152,  156,  250,  251,  252,  335,
      253,  153,  153,  830,  155,  389,  155,  156,  155,  156,
      882,  156,  802,  578,  679,  912,  302,  875,  155,  155,
     1300,  156,  156,  916,  874, 1150,  920,  877,  254,  152,
      873,  246,  882,  304,  247,  248,  878,  153,  885,  247,
      876,  247,  152,  247,  879,  979,  886,  882,  881,  882,

      153,  914, 1343,  250,  251,  252,  883,  253, 1134, 1184,
     1134,  155, 1043, 1342,  156,  916, 1014,  155,  679,  882,
      156,  882,  803,  884, 1014,  885,  916,  885,  747,  747,
      747,  747,  747,  747,  747,  254,  489,  489, 1008,  489,
      489,  489,  489,  489,  489,  489,  489,  489,  489,  489,
      489,  489,  489,  489,  489,  489,  489,  489,  489,  489,
      489,  489,  489,  489,  489,  489,  489,  490,  831,  831,
      831,  831,  831,  831,  831,  831,  831,  831,  831,  831,
      831,  831,  831,  831,  831,  831,  831,  831,  831,  831,
      831,  831,  831,  489,  696,  763,  763,  763,  763,  763,

      763,  763,  697,  880,  698,  880,  698,  699, 1335,  700,
      701,  701,  701,  701,  701,  701,  702,  763,  763,  763,
      763,  763,  763,  763,  331,  698,  490,  698,  699,  920,
      700,  701,  701,  701,  701,  701,  701,  702,  766,  766,
      766,  766,  766,  766,  766,  331,  854,  490,  854,  855,
     1302,  856,  857,  857,  857,  857,  857,  857,  330,  374,
      920,  490,  375,  560, 1313,  922,  912,  375, 1330,  375,
      927,  375,  744,  744,  744,  744,  744,  744,  744,  916,
     1304,  379,  380,  381,  766,  766,  766,  766,  766,  766,
      766,  770,  830,  771,  772,  772,  772,  772,  772,  772,

      911,  911,  911,  911,  911,  911,  911, 1296, 1150, 1130,
      916,  986,  882,  565,  374,  830,  916,  375,  560,  987,
      931,  604,  375,  436,  375,  436,  375,  745,  745,  745,
      745,  745,  745,  745,  882, 1439,  379,  380,  381,  927,
      885, 1084,  152,  605,  745,  745,  745,  745,  745,  745,
      153, 1020, 1016,  830,  776,  900,  777,  778,  778,  778,
      778,  778,  778, 1234, 1287,  605, 1085,  155,  565,  374,
      156,  830,  375,  376, 1016, 1047,  377,  375,  335,  375,
     1019,  375,  747,  747,  747,  747,  747,  747,  747,  931,
     1150,  379,  380,  381,  919,  919,  919,  919,  919,  919,

      919,  782, 1150,  783,  784,  784,  784,  784,  784,  784,
      926,  926,  926,  926,  926,  926,  926,  912,  436,  927,
      436, 1255,  490,  385,  374,  152,  920,  375,  376,  608,
      679,  377,  375,  153,  375, 1306,  375,  425,  426,  426,
      426,  426,  426,  426,  436, 1086,  379,  380,  381,  882,
      155,  609,  436,  156,  436,  929,  436,  937,  937,  937,
      937,  937,  937,  937,  490, 1000,  436,  916,  612,  931,
     1087,  882,  437,  609, 1246,  490,  916,  885,  385,  768,
      800,  800,  800,  800,  800,  800,  800,  628,  830,  769,
      613,  769,  770, 1028,  771,  772,  772,  772,  772,  772,

      772,  912,  800,  800,  800,  800,  800,  800,  800, 1014,
     1346, 1014,  613, 1084,  913, 1086,  772,  772,  772,  772,
      772,  772,  772,  843,  843,  843,  843,  843,  843,  843,
      843,  843,  843,  843,  843,  843,  843,  914, 1085,  152,
     1087, 1331,  912,  830,  915,  490,  679,  153,  302, 1332,
     1150,  916, 1503, 1286, 1503,  917,  774,  847,  847,  847,
      847,  847,  847,  847,  155,  304,  775,  156,  775,  776,
      920,  777,  778,  778,  778,  778,  778,  778,  920,  847,
      847,  847,  847,  847,  847,  847, 1285,  886,  882,  335,
      934,  921,  916,  778,  778,  778,  778,  778,  778,  778,

      995,  995,  995,  995,  995,  995,  995,  830,  490, 1182,
      882, 1183,  935, 1133,  922,  331,  885,  830, 1247,  152,
      916,  923, 1353, 1227, 1228,  418,  490,  153,  916,  236,
     1089, 1364,  924,  780,  609,  859,  859,  859,  859,  859,
      859,  859,  927,  781,  155,  781,  782,  156,  783,  784,
      784,  784,  784,  784,  784,  927, 1001,  859,  859,  859,
      859,  859,  859,  859,  830,  830,  886,  882,  928, 1007,
      784,  784,  784,  784,  784,  784,  784, 1352,  861,  152,
     1016, 1503, 1401,  302,  882, 1136,  152,  153,  927,  882,
      830,  929,  931,  152,  153,  885, 1295,  830,  930, 1290,

      304,  153, 1016,  830,  155,  931,  882,  156, 1019,  932,
      786,  155,  885, 1350,  156,  152,  152, 1091,  155, 1009,
      424,  156,  424,  153,  153,  425,  426,  426,  426,  426,
      426,  426,  230, 1011,  830, 1503, 1292,  302,  931, 1089,
      155,  155,  830,  156,  156,  418,  830, 1012, 1289,  236,
      934, 1284,  224,  225,  304,  226,  227,  228, 1414, 1231,
      226,  335,  226, 1232,  226,  789,  789,  789,  789,  789,
      789,  789,  935,  152,  231,  232,  233, 1090,  830,  490,
      152,  153,  433,  433,  433,  616,  433,  433,  153,  236,
      237, 1252,  490,  936,  609, 1240, 1241,  239,  155,  240,

      830,  156, 1294, 1355,  611,  155,  242,  791,  156, 1103,
     1015, 1016, 1016, 1283, 1357,  792, 1253,  793, 1017,  793,
      794, 1089,  795,  796,  796,  796,  796,  796,  796,  797,
      490, 1013,  830, 1016, 1016, 1018, 1308,  437,  791, 1019,
     1019,  881,  882, 1016, 1094, 1016,  792, 1297,  793,  883,
      793,  794, 1095,  795,  796,  796,  796,  796,  796,  796,
      797, 1503, 1282,  302,  882, 1016,  884, 1016,  437,  436,
      885, 1019,  490, 1019,  490,  152, 1303,  436, 1281,  436,
      304,  436,  938,  153,  796, 1244,  490, 1115, 1092, 1245,
      490,  436,  899,  899,  899,  899,  899,  899,  899,  880,

      155, 1301,  490,  156, 1305,  939,  490,  880, 1307,  880,
     1442,  880,  940,  909,  909,  909,  909,  909,  909,  909,
      490,  880, 1089,  941,  436,  909,  909,  909,  909,  909,
      909,  909,  436, 1184,  436, 1309,  436,  938, 1280,  796,
     1020, 1016,  679, 1380,  302,  830,  436, 1059, 1059, 1059,
     1059, 1059, 1059, 1059,  830, 1298,  830, 1274, 1299, 1398,
      939,  304,  437, 1016,  986,  882, 1356,  940,  942, 1019,
      942,  943,  987,  944,  945,  945,  945,  945,  945,  945,
      947,  947,  947,  947,  947,  947,  947,  882,  437,  152,
      628,  246,  920,  885,  247,  248,  490,  153,  331,  247,

     1359,  247, 1503,  247, 1503,  947,  947,  947,  947,  947,
      947,  947,  490,  250,  251,  252,  830,  253,  965,  966,
      967,  882,  968,  969,  886,  882,  949, 1310,  830,  970,
     1289, 1347,  490,  971,  972,  989,  989,  989,  989,  989,
      989,  989,  916,  882,  490,  254,  152,  882,  246,  885,
     1302,  247,  248,  885,  153,  490,  247, 1366,  247, 1261,
      247,  989,  989,  989,  989,  989,  989,  989, 1363, 1252,
      250,  251,  252, 1225,  253,  993,  993,  993,  993,  993,
      993,  993,  993,  993,  993,  993,  993,  993,  993,  830,
      331,  830, 1224,  490, 1253, 1302, 1400,  331,  950, 1089,

     1020, 1016,  254,  963, 1349,  964, 1003, 1003, 1003, 1003,
     1003, 1003, 1003,  964,  490,  964, 1003, 1003, 1003, 1003,
     1003, 1003, 1003, 1016, 1311, 1020, 1016, 1312,  830, 1019,
      490,  829,  489,  829,  489,  965,  966,  967, 1229,  968,
      969,  829,  489,  829,  489, 1230,  970, 1408, 1016, 1223,
      971,  972,  489,  489, 1019,  489,  489,  489,  489,  489,
      489,  489,  974,  489,  489,  489,  489,  489,  975,  975,
      975,  975,  975,  975,  975,  489,  489,  489,  489,  489,
      489,  976,  489,  490,  975,  975,  975,  975,  975,  975,
      975,  975,  975,  975,  975,  975,  975,  975,  975,  975,

      975,  975,  975,  975,  975,  975,  975,  975,  975,  489,
      849,  849,  849,  849,  849,  849,  849, 1222,  152, 1015,
     1016, 1385, 1094, 1016,  830,  331,  153, 1017, 1150, 1386,
     1095,  991,  849,  849,  849,  849,  849,  849,  849, 1351,
      490,  152, 1016,  155, 1018, 1016,  156,  331, 1019,  153,
     1242, 1019,  830,  851,  992,  830,  992, 1243, 1289,  993,
      993,  993,  993,  993,  993,  993,  155,  345, 1221,  156,
     1354,  490,  490,  490,  331,  994,  994,  994,  994,  994,
      994,  994, 1220,  152,  345, 1016, 1358, 1360, 1362,  490,
      331,  153,  994,  994,  994,  994,  994,  994,  855, 1361,

      856,  857,  857,  857,  857,  857,  857, 1016,  155, 1020,
     1016,  156,  830, 1019,  490,  331,  996,  345,  857,  857,
      857,  857,  857,  857,  857, 1397,  152,  152,  882, 1365,
     1219, 1503, 1016,  331,  153,  153, 1255,  490, 1019,  997,
     1503, 1016,  302, 1302,  830,  679,  998,  302,  830, 1402,
      882,  155,  155, 1218,  156,  156,  885,  999,  871,  304,
      345, 1399,  490, 1016,  304, 1089,  872, 1107,  704, 1019,
      704,  705, 1367,  706,  707,  707,  707,  707,  707,  707,
     1368, 1217, 1185,  155, 1010, 1041, 1041, 1041, 1041, 1041,
     1041, 1041, 1503,  830,  704, 1089,  704,  705, 1289,  706,

      707,  707,  707,  707,  707,  707, 1503, 1184, 1373, 1503,
     1021,  882, 1374,  830,  882, 1503,  679,  302, 1022,  490,
     1023, 1403, 1023, 1024, 1405, 1025, 1026, 1026, 1026, 1026,
     1026, 1026, 1027,  882,  304,  830,  882, 1235,  490,  885,
      374, 1186,  885,  375,  560, 1236, 1410,  490,  375, 1216,
      375, 1237,  375,  899,  899,  899,  899,  899,  899,  899,
     1404, 1215,  379,  380,  381, 1045, 1045, 1045, 1045, 1045,
     1045, 1045, 1049, 1049, 1049, 1049, 1049, 1049, 1049,  776,
     1014, 1053, 1054, 1054, 1054, 1054, 1054, 1054, 1014, 1089,
     1014, 1089, 1014, 1446,  565,  374, 1089, 1214,  375,  560,

      457, 1375, 1014,  375, 1089,  375, 1376,  375, 1097, 1097,
     1097, 1097, 1097, 1097, 1097, 1393, 1389,  379,  380,  381,
     1369, 1370,  830,  331, 1097, 1097, 1097, 1097, 1097, 1097,
     1097, 1101, 1101, 1101, 1101, 1101, 1101, 1101, 1389,  331,
      490,  830,  490, 1289, 1392,  490,  331, 1289, 1302,  565,
     1051, 1105, 1105, 1105, 1105, 1105, 1105, 1105, 1406,  490,
     1052, 1302, 1052,  776, 1407, 1053, 1054, 1054, 1054, 1054,
     1054, 1054,  934, 1213,  224,  225,  490,  226,  227,  228,
      490, 1409,  226,  830,  226, 1302,  226, 1101, 1101, 1101,
     1101, 1101, 1101, 1101,  935,  152,  231,  232,  233, 1089,

     1089, 1413,  331,  153, 1089, 1438, 1415,  234,  730, 1089,
     1371,  236,  237, 1089,  152,  927,  609, 1372, 1137,  239,
      155,  240,  153,  156, 1256, 1503, 1423, 1503,  242,  937,
      937,  937,  937,  937,  937,  937, 1089, 1412, 1417,  155,
      605, 1191,  156,  880,  437,  880, 1206, 1089, 1124, 1016,
     1055,  937,  937,  937,  937,  937,  937,  937, 1326,  830,
     1416, 1289,  605,  345, 1327,  931,  437, 1328,  916, 1207,
      679, 1016,  939, 1056, 1329, 1056, 1208, 1019, 1057, 1057,
     1057, 1057, 1057, 1057, 1057, 1105, 1105, 1105, 1105, 1105,
     1105, 1105, 1089,  437, 1058, 1058, 1058, 1058, 1058, 1058,

     1058, 1489, 1331,  880, 1137,  880, 1206, 1411, 1124,  437,
     1332, 1058, 1058, 1058, 1058, 1058, 1058,  943, 1089,  944,
      945,  945,  945,  945,  945,  945,  605,  155,  882, 1207,
      156, 1137,  730, 1419,  437, 1060, 1208,  945,  945,  945,
      945,  945,  945,  945,  830, 1089, 1289, 1209,  605, 1088,
      882, 1088,  437,  605,  916, 1255,  885, 1089, 1061, 1088,
     1420, 1088, 1389, 1418,  679, 1062, 1129, 1129, 1129, 1129,
     1129, 1129, 1129, 1089, 1279,  605, 1063,  152, 1137,  246,
     1089,  916,  247,  248, 1389,  153, 1412,  247, 1445,  247,
     1392,  247, 1132, 1132, 1132, 1132, 1132, 1132, 1132,  730,

      605,  250,  251,  252, 1089,  253, 1135, 1135, 1135, 1135,
     1135, 1135, 1135,  490, 1089, 1248,  830, 1064, 1289, 1447,
      830, 1256,  605, 1249, 1421, 1016, 1289, 1422,  916, 1250,
     1503,  331,  302,  254,  152, 1089,  246, 1377, 1089,  247,
      248, 1503,  153, 1451,  247, 1378,  247, 1016,  247,  304,
     1503, 1379,  302, 1019,  490, 1257, 1302,  152,  250,  251,
      252, 1258,  253, 1187, 1259,  153,  490, 1089, 1302,  304,
      490, 1260, 1189, 1189, 1189, 1189, 1189, 1189, 1189,  490,
      305, 1302,  155, 1089,  447,  156, 1161,  331, 1393, 1389,
      254,  963, 1441,  964, 1189, 1189, 1189, 1189, 1189, 1189,

     1189,  964, 1262,  964,  490, 1444, 1388, 1389, 1089,  331,
     1302, 1389, 1089, 1089, 1390, 1089, 1089, 1392, 1448, 1150,
     1089, 1089, 1412,  965,  966,  967, 1450,  968,  969, 1389,
     1449, 1391, 1089, 1467,  970, 1392, 1452, 1453,  971,  972,
      489,  489, 1454,  489,  489,  489,  489,  489,  489,  489,
      974,  489,  489,  489,  489,  489,  975,  975,  975,  975,
      975,  975,  975,  489,  489,  489,  489,  489,  489,  976,
      489,  490,  975,  975,  975,  975,  975,  975,  975,  975,
      975,  975,  975,  975,  975,  975,  975,  975,  975,  975,
      975,  975,  975,  975,  975,  975,  975,  489, 1096,  830,

     1096, 1503,  490, 1097, 1097, 1097, 1097, 1097, 1097, 1097,
     1503,  830,  302,  490, 1289, 1089, 1158, 1302,  331,  994,
      994,  994,  994,  994,  994,  994,  830, 1387, 1469,  304,
     1157, 1289, 1289, 1302,  331, 1387,  994,  994,  994,  994,
      994,  994, 1089, 1387, 1412, 1387,  308, 1098,  995,  995,
      995,  995,  995,  995,  995, 1389, 1014, 1089, 1014, 1268,
      490, 1200, 1014,  331, 1014, 1268, 1302, 1200, 1089, 1099,
      995,  995,  995,  995,  995,  995,  995, 1389, 1412, 1089,
     1156, 1089, 1269, 1392, 1468,  331, 1470, 1089, 1269, 1270,
     1485,  997, 1100, 1155, 1100, 1270, 1503, 1101, 1101, 1101,

     1101, 1101, 1101, 1101, 1471, 1503, 1271,  302, 1089, 1154,
     1412, 1503,  331, 1102, 1102, 1102, 1102, 1102, 1102, 1102,
     1503, 1089,  302, 1089,  304, 1089, 1472, 1412,  331, 1412,
     1102, 1102, 1102, 1102, 1102, 1102, 1108, 1016, 1089,  304,
     1153, 1089,  309, 1412, 1109, 1152, 1110, 1412, 1110, 1111,
      310, 1112, 1113, 1113, 1113, 1113, 1113, 1113, 1114, 1016,
     1089, 1089, 1151, 1412, 1150, 1019, 1021,  882, 1473, 1428,
     1389, 1393, 1389, 1089, 1022, 1089, 1023, 1429, 1023, 1024,
     1389, 1025, 1026, 1026, 1026, 1026, 1026, 1026, 1027,  882,
     1412, 1149, 1389, 1486, 1389,  885,  882, 1089, 1392, 1148,

     1392, 1389, 1389, 1393, 1389, 1393, 1389,  457, 1392,  457,
     1116, 1116, 1116, 1116, 1116, 1116, 1116, 1412,  882, 1388,
     1389,  457,  457, 1389,  885,  880, 1389, 1390, 1389, 1392,
     1389, 1387, 1392,  880, 1392,  880, 1503,  880, 1117, 1387,
     1026, 1387, 1389, 1387, 1391, 1437, 1127,  880, 1392, 1428,
     1389,  320, 1389, 1387, 1089,  320,  320, 1429, 1392,  730,
     1412, 1118,  319, 1389,  319,  207,  207,  319, 1119, 1126,
      207, 1387, 1389, 1387, 1481,  730, 1466, 1389, 1392, 1120,
      880, 1387,  730, 1387, 1481, 1389, 1466,  730,  880, 1125,
      880, 1392,  880, 1117, 1006, 1026,  409, 1482,  409, 1389,

     1006,  409,  880, 1106, 1483, 1392,  410, 1482,  433,  331,
      410,  410,  433,  433, 1483, 1484, 1118,  428, 1093,  428,
     1089, 1083,  428, 1119,  880,  503,  571,  503,  571, 1079,
      503,  571,  880,  591, 1121,  591, 1121, 1122,  591, 1123,
     1124, 1124, 1124, 1124, 1124, 1124,  880, 1051,  572,  600,
     1078,  600,  572,  572,  600, 1071,  603, 1052,  603, 1052,
      776,  603, 1053, 1054, 1054, 1054, 1054, 1054, 1054, 1137,
      601,  689,  476,  689,  601,  601,  689,  476,  744,  476,
      744,  249,  921,  744, 1054, 1054, 1054, 1054, 1054, 1054,
     1054,  605,  690, 1065,  745,  628,  690,  690,  745,  745,

      436,  747,  763,  747,  763,  922,  747,  763,  437,  730,
      764, 1035, 1138,  605,  764,  764,  766,  730,  766,  916,
      800,  766,  800, 1139, 1140,  800, 1140,  436,  730, 1141,
     1141, 1141, 1141, 1141, 1141, 1141,  773,  627,  779,  730,
      773,  773,  779,  779,  785, 1034, 1033,  627,  785,  785,
      436,  801,  627, 1032, 1031,  801,  801,  436,  843,  847,
      843,  847,  848,  843,  847, 1030,  848,  848,  436,  436,
     1029,  436, 1006,  865, 1057, 1057, 1057, 1057, 1057, 1057,
     1057,  436,  330,  436,  331,  990, 1057, 1057, 1057, 1057,
     1057, 1057, 1057,  436,  983,  436,  830,  962, 1058, 1058,

     1058, 1058, 1058, 1058, 1058,  899,  909,  899,  909, 1004,
      899,  909, 1041, 1004, 1004, 1058, 1058, 1058, 1058, 1058,
     1058,  476, 1041,  947,  961,  947, 1142,  436,  947,  436,
     1041,  476, 1059, 1059, 1059, 1059, 1059, 1059, 1059,  989,
     1003,  989, 1003,  476,  989, 1003, 1041, 1045, 1041, 1045,
      476, 1041, 1045, 1143,  436,  960,  436, 1045, 1503, 1059,
     1059, 1059, 1059, 1059, 1059, 1059, 1042, 1045, 1046, 1503,
     1042, 1042, 1046, 1046, 1049, 1045, 1049, 1503, 1503, 1049,
     1061, 1144,  910, 1144,  897,  896, 1145, 1145, 1145, 1145,
     1145, 1145, 1145,  436,  895,  436,  894,  730,  436,  436,

      436,  436,  436,  436,  436, 1146, 1146, 1146, 1146, 1146,
     1146, 1146, 1050, 1105,  893, 1105, 1050, 1050, 1105, 1049,
      892,  891, 1146, 1146, 1146, 1146, 1146, 1146,  890, 1049,
     1129,  889, 1129,  436,  152, 1129,  246, 1049,  888,  247,
      248,  887,  153,  865,  247, 1132,  247, 1132,  247, 1135,
     1132, 1135, 1210,  844, 1135,  839, 1210, 1210,  250,  251,
      252,  838,  253,  837,  830,  476,  826,  476,  476,  476,
     1147,  825,  824,  823,  822,  821,  820,  249,  805,  628,
      628,  437,  437,  767,  209,  389,  576,  576,  574,  574,
      254,  152,  748,  246,  748,  375,  247,  248,  562,  153,

      375,  247,  741,  247,  730,  247,  738,  737,  736,  735,
      734,  733,  732,  731,  730,  250,  251,  252,  729,  253,
      331,  686,  685,  684,  490,  474,  474,  249, 1503,  437,
      435,  435, 1503, 1503, 1503,  576,  389,  574,  387,  567,
      375,  382,  567,  375, 1503,  558,  554,  254, 1162,  553,
     1163,  546,  331,  322,  322,  504,  501,  500, 1163,  499,
     1163,  498,  490,  487,  476,  484,  483,  482,  481,  480,
      479,  478,  477,  476,  475,  474,  287,  469,  830,  247,
     1164, 1165, 1166,  437, 1167, 1168,  247,  247,  247,  435,
      244, 1169,  226,  226,  235, 1170, 1171, 1172,  226, 1173,

      226, 1503,  209, 1503,  389,  387, 1503, 1173,  331, 1173,
      322,  150,  315,  314,  312, 1503,  126,  126,  301,  297,
      296,  289,  115,  288,  287,  218,  245,  490,  244, 1174,
     1175, 1176,  218, 1177, 1178,  218,  218,  203,  217,  203,
     1179,  203,  203,  116, 1180, 1181, 1188,  151, 1188,  150,
      116, 1189, 1189, 1189, 1189, 1189, 1189, 1189,  126,  116,
      126,  115, 1503, 1503, 1503, 1503,  331, 1102, 1102, 1102,
     1102, 1102, 1102, 1102, 1503, 1503, 1503, 1503, 1503, 1503,
     1503, 1503,  331, 1503, 1102, 1102, 1102, 1102, 1102, 1102,
     1503, 1503, 1503, 1503, 1503, 1190, 1016, 1503, 1503, 1503,

     1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503,
     1192, 1192, 1192, 1192, 1192, 1192, 1192, 1503, 1016, 1503,
     1503, 1503, 1503, 1503, 1019, 1014, 1503, 1503, 1503, 1503,
     1503, 1503, 1503, 1014, 1503, 1014, 1503, 1014, 1193, 1503,
     1113, 1503, 1503, 1503, 1503, 1503, 1503, 1014, 1503, 1503,
     1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503,
     1503, 1194, 1503, 1503, 1503, 1503, 1503, 1503, 1195, 1503,
     1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1196,
     1014, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1014, 1503,
     1014, 1503, 1014, 1193, 1503, 1113, 1503, 1503, 1503, 1503,

     1503, 1503, 1014, 1503, 1503, 1503, 1503, 1503, 1503, 1503,
     1503, 1503, 1503, 1503, 1503, 1503, 1194, 1503, 1503, 1503,
     1503, 1503, 1503, 1195, 1014, 1503, 1503, 1503, 1503, 1503,
     1503, 1503, 1014, 1503, 1197, 1503, 1197, 1198, 1503, 1199,
     1200, 1200, 1200, 1200, 1200, 1200, 1014,  882, 1503, 1503,
     1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503,
     1503, 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1503,  882,
     1503, 1503, 1503, 1503, 1503,  885, 1503, 1503, 1503, 1503,
     1503, 1503, 1201,  882, 1503, 1503, 1503, 1503, 1503, 1503,
     1503, 1503, 1503, 1503, 1503, 1503, 1503, 1116, 1116, 1116,

     1116, 1116, 1116, 1116, 1503,  882, 1503, 1503, 1503, 1503,
     1503,  885, 1503, 1503, 1503, 1503, 1503, 1503, 1118, 1202,
     1503, 1202,  880, 1503, 1203, 1203, 1203, 1203, 1203, 1203,
     1203,  882, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503,
     1503, 1503, 1503, 1503, 1503, 1204, 1204, 1204, 1204, 1204,
     1204, 1204, 1503,  882, 1503, 1503, 1503, 1503, 1503,  885,
     1503, 1503, 1204, 1204, 1204, 1204, 1204, 1204,  880, 1503,
      880,  880, 1503, 1205, 1205, 1205, 1205, 1205, 1205, 1205,
      436, 1503,  436, 1503, 1503,  436,  436,  436,  436,  436,
      436,  436, 1211, 1503, 1211, 1503, 1503, 1212, 1212, 1212,

     1212, 1212, 1212, 1212,  436, 1503,  436, 1503, 1503, 1145,
     1145, 1145, 1145, 1145, 1145, 1145,  436, 1503,  436, 1503,
     1503, 1145, 1145, 1145, 1145, 1145, 1145, 1145, 1089, 1254,
     1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254,
     1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254,
     1254, 1254, 1254, 1254, 1016, 1503, 1503, 1503, 1503, 1503,
     1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1192, 1192,
     1192, 1192, 1192, 1192, 1192, 1503, 1016, 1503, 1503, 1503,
     1503, 1503, 1019, 1503, 1503, 1503, 1503, 1503, 1503, 1263,
     1016, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503,

     1503, 1503, 1503, 1503, 1192, 1192, 1192, 1192, 1192, 1192,
     1192, 1503, 1016, 1503, 1503, 1503, 1503, 1503, 1019, 1503,
     1503, 1503, 1503, 1503, 1503, 1194, 1264, 1503, 1264, 1014,
     1503, 1265, 1265, 1265, 1265, 1265, 1265, 1265, 1016, 1503,
     1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503,
     1503, 1503, 1266, 1266, 1266, 1266, 1266, 1266, 1266, 1503,
     1016, 1503, 1503, 1503, 1503, 1503, 1019, 1503, 1503, 1266,
     1266, 1266, 1266, 1266, 1266, 1014, 1503, 1014, 1014, 1503,
     1267, 1267, 1267, 1267, 1267, 1267, 1267, 1272, 1503, 1272,
      880, 1503, 1273, 1273, 1273, 1273, 1273, 1273, 1273,  880,

     1503,  880,  880, 1503, 1203, 1203, 1203, 1203, 1203, 1203,
     1203,  880, 1503,  880,  880, 1503, 1203, 1203, 1203, 1203,
     1203, 1203, 1203,  880, 1503,  880,  880, 1503, 1205, 1205,
     1205, 1205, 1205, 1205, 1205, 1503, 1503, 1503, 1503, 1503,
     1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1275,
      880, 1503,  880,  880, 1503, 1205, 1205, 1205, 1205, 1205,
     1205, 1205, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503,
     1503, 1503, 1503, 1503, 1503, 1503, 1207, 1276, 1503, 1276,
      880, 1503, 1277, 1277, 1277, 1277, 1277, 1277, 1277, 1278,
     1278, 1278, 1278, 1278, 1278, 1278, 1503, 1503, 1503, 1503,

     1503, 1503, 1503, 1503, 1503, 1503, 1278, 1278, 1278, 1278,
     1278, 1278,  436, 1503,  436, 1503, 1503, 1212, 1212, 1212,
     1212, 1212, 1212, 1212,  436, 1503,  436, 1503, 1503, 1212,
     1212, 1212, 1212, 1212, 1212, 1212,  436, 1503,  436, 1503,
     1503,  436,  436,  436,  436,  436,  436,  436, 1314, 1503,
     1315, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1315, 1503,
     1315, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503,
     1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1089, 1503,
     1316, 1317, 1318, 1503, 1319, 1320, 1503, 1503, 1503, 1503,
     1503, 1321, 1503, 1503, 1503, 1322, 1323, 1088, 1088, 1503,

     1088, 1088, 1088, 1088, 1088, 1088, 1088, 1182, 1088, 1088,
     1088, 1088, 1088, 1324, 1324, 1324, 1324, 1324, 1324, 1324,
     1088, 1088, 1088, 1088, 1088, 1088, 1325, 1088, 1089, 1324,
     1324, 1324, 1324, 1324, 1324, 1324, 1324, 1324, 1324, 1324,
     1324, 1324, 1324, 1324, 1324, 1324, 1324, 1324, 1324, 1324,
     1324, 1324, 1324, 1324, 1088, 1333, 1503, 1333, 1014, 1503,
     1334, 1334, 1334, 1334, 1334, 1334, 1334, 1014, 1503, 1014,
     1014, 1503, 1265, 1265, 1265, 1265, 1265, 1265, 1265, 1014,
     1503, 1014, 1014, 1503, 1265, 1265, 1265, 1265, 1265, 1265,
     1265, 1014, 1503, 1014, 1014, 1503, 1267, 1267, 1267, 1267,

     1267, 1267, 1267, 1503, 1503, 1503, 1503, 1503, 1503, 1503,
     1503, 1503, 1503, 1503, 1503, 1503, 1503, 1336, 1014, 1503,
     1014, 1014, 1503, 1267, 1267, 1267, 1267, 1267, 1267, 1267,
     1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503,
     1503, 1503, 1503, 1503, 1269, 1337, 1503, 1337, 1014, 1503,
     1338, 1338, 1338, 1338, 1338, 1338, 1338, 1339, 1339, 1339,
     1339, 1339, 1339, 1339, 1503, 1503, 1503, 1503, 1503, 1503,
     1503, 1503, 1503, 1503, 1339, 1339, 1339, 1339, 1339, 1339,
      882, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503,
     1503, 1503, 1503, 1503, 1273, 1273, 1273, 1273, 1273, 1273,

     1273, 1503,  882, 1503, 1503, 1503, 1503, 1503,  885,  882,
     1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503,
     1503, 1503, 1503, 1273, 1273, 1273, 1273, 1273, 1273, 1273,
     1503,  882, 1503, 1503, 1503, 1503, 1503,  885, 1340, 1503,
     1340,  880, 1503, 1341, 1341, 1341, 1341, 1341, 1341, 1341,
      880, 1503,  880,  880, 1503, 1277, 1277, 1277, 1277, 1277,
     1277, 1277,  880, 1503,  880,  880, 1503, 1277, 1277, 1277,
     1277, 1277, 1277, 1277, 1016, 1503, 1503, 1503, 1503, 1503,
     1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1334, 1334,
     1334, 1334, 1334, 1334, 1334, 1503, 1016, 1503, 1503, 1503,

     1503, 1503, 1019, 1016, 1503, 1503, 1503, 1503, 1503, 1503,
     1503, 1503, 1503, 1503, 1503, 1503, 1503, 1334, 1334, 1334,
     1334, 1334, 1334, 1334, 1503, 1016, 1503, 1503, 1503, 1503,
     1503, 1019, 1394, 1503, 1394, 1014, 1503, 1395, 1395, 1395,
     1395, 1395, 1395, 1395, 1014, 1503, 1014, 1014, 1503, 1338,
     1338, 1338, 1338, 1338, 1338, 1338, 1014, 1503, 1014, 1014,
     1503, 1338, 1338, 1338, 1338, 1338, 1338, 1338,  880, 1503,
      880,  880, 1503, 1341, 1341, 1341, 1341, 1341, 1341, 1341,
      880, 1503,  880,  880, 1503, 1341, 1341, 1341, 1341, 1341,
     1341, 1341, 1430, 1389, 1503, 1503, 1503, 1503, 1503, 1503,

     1431, 1503, 1432, 1503, 1432, 1433, 1503, 1434, 1435, 1435,
     1435, 1435, 1435, 1435, 1436, 1389, 1503, 1503, 1503, 1503,
     1503, 1392, 1014, 1503, 1014, 1014, 1503, 1395, 1395, 1395,
     1395, 1395, 1395, 1395, 1014, 1503, 1014, 1014, 1503, 1395,
     1395, 1395, 1395, 1395, 1395, 1395, 1389, 1503, 1503, 1503,
     1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503,
     1458, 1458, 1458, 1458, 1458, 1458, 1458, 1503, 1389, 1503,
     1503, 1503, 1503, 1503, 1392, 1387, 1503, 1503, 1503, 1503,
     1503, 1503, 1503, 1387, 1503, 1387, 1503, 1387, 1459, 1503,
     1435, 1503, 1503, 1503, 1503, 1503, 1503, 1387, 1503, 1503,

     1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503,
     1503, 1460, 1503, 1503, 1503, 1503, 1503, 1503, 1461, 1503,
     1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1462,
     1387, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1387, 1503,
     1387, 1503, 1387, 1459, 1503, 1435, 1503, 1503, 1503, 1503,
     1503, 1503, 1387, 1503, 1503, 1503, 1503, 1503, 1503, 1503,
     1503, 1503, 1503, 1503, 1503, 1503, 1460, 1503, 1503, 1503,
     1503, 1503, 1503, 1461, 1387, 1503, 1503, 1503, 1503, 1503,
     1503, 1503, 1387, 1503, 1463, 1503, 1463, 1464, 1503, 1465,
     1466, 1466, 1466, 1466, 1466, 1466, 1387, 1389, 1503, 1503,

     1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503,
     1503, 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1503, 1389,
     1503, 1503, 1503, 1503, 1503, 1392, 1503, 1503, 1503, 1503,
     1503, 1503, 1476, 1389, 1503, 1503, 1503, 1503, 1503, 1503,
     1503, 1503, 1503, 1503, 1503, 1503, 1503, 1458, 1458, 1458,
     1458, 1458, 1458, 1458, 1503, 1389, 1503, 1503, 1503, 1503,
     1503, 1392, 1503, 1503, 1503, 1503, 1503, 1503, 1460, 1477,
     1503, 1477, 1387, 1503, 1478, 1478, 1478, 1478, 1478, 1478,
     1478, 1389, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503,
     1503, 1503, 1503, 1503, 1503, 1479, 1479, 1479, 1479, 1479,

     1479, 1479, 1503, 1389, 1503, 1503, 1503, 1503, 1503, 1392,
     1503, 1503, 1479, 1479, 1479, 1479, 1479, 1479, 1387, 1503,
     1387, 1387, 1503, 1480, 1480, 1480, 1480, 1480, 1480, 1480,
     1490, 1503, 1490, 1387, 1503, 1491, 1491, 1491, 1491, 1491,
     1491, 1491, 1387, 1503, 1387, 1387, 1503, 1478, 1478, 1478,
     1478, 1478, 1478, 1478, 1387, 1503, 1387, 1387, 1503, 1478,
     1478, 1478, 1478, 1478, 1478, 1478, 1387, 1503, 1387, 1387,
     1503, 1480, 1480, 1480, 1480, 1480, 1480, 1480, 1503, 1503,
     1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503,
     1503, 1503, 1493, 1387, 1503, 1387, 1387, 1503, 1480, 1480,

     1480, 1480, 1480, 1480, 1480, 1503, 1503, 1503, 1503, 1503,
     1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1482,
     1494, 1503, 1494, 1387, 1503, 1495, 1495, 1495, 1495, 1495,
     1495, 1495, 1496, 1496, 1496, 1496, 1496, 1496, 1496, 1503,
     1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1496,
     1496, 1496, 1496, 1496, 1496, 1389, 1503, 1503, 1503, 1503,
     1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1491,
     1491, 1491, 1491, 1491, 1491, 1491, 1503, 1389, 1503, 1503,
     1503, 1503, 1503, 1392, 1389, 1503, 1503, 1503, 1503, 1503,
     1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1491, 1491,

     1491, 1491, 1491, 1491, 1491, 1503, 1389, 1503, 1503, 1503,
     1503, 1503, 1392, 1499, 1503, 1499, 1387, 1503, 1500, 1500,
     1500, 1500, 1500, 1500, 1500, 1387, 1503, 1387, 1387, 1503,
     1495, 1495, 1495, 1495, 1495, 1495, 1495, 1387, 1503, 1387,
     1387, 1503, 1495, 1495, 1495, 1495, 1495, 1495, 1495, 1387,
     1503, 1387, 1387, 1503, 1500, 1500, 1500, 1500, 1500, 1500,
     1500, 1387, 1503, 1387, 1387, 1503, 1500, 1500, 1500, 1500,
     1500, 1500, 1500,  112,  112,  112,  112,  112,  112,  112,
      112,  112,  112,  112,  112,  112,  112,  112,  112,  112,
      112,  112,  112,  112,  125,  125,  125,  125,  125,  125,

      125,  125,  125,  125,  125,  125,  125,  125,  125,  125,
      125,  125,  125,  125,  125,  127,  127,  127,  127,  127,
      127,  127,  127,  127,  127,  127,  127,  127,  127,  127,
      127,  127,  127,  127,  127,  127,  128,  128,  128,  128,
      128,  128,  128,  149,  149,  149,  149, 1503,  149,  149,
      149,  149,  149,  149,  149,  149,  154, 1503, 1503,  154,
     1503, 1503, 1503, 1503, 1503, 1503,  154, 1503,  154,  154,
      154,  154,  154,  154,  154,  154,  216, 1503,  216,  216,
     1503,  216,  243,  243,  243,  243, 1503,  243,  243,  243,
      243,  243,  243,  243,  243,  249, 1503,  249,  249, 1503,

      249, 1503,  249, 1503,  249,  249, 1503,  249,  249,  249,
      249,  249,  249,  249,  249,  286, 1503,  286,  286,  286,
      286,  286,  286,  286,  286,  303, 1503, 1503, 1503,  303,
     1503,  303,  303,  303,  303,  303,  303,  303,  303,  321,
      321, 1503,  321,  321,  321,  321,  321,  321,  321,  321,
      321,  321,  321,  321,  321,  321,  321,  321,  321,  321,
      330,  330, 1503,  330,  330,  330,  330,  330,  330,  330,
      330,  330,  330,  330,  330,  330,  330,  330,  330,  330,
      330,  386,  386,  386,  386, 1503,  386,  386,  386,  386,
      386,  386,  386,  386,  388, 1503,  388,  388,  388,  388,

      388,  388,  388,  388,  407, 1503,  407,  407, 1503,  407,
      216, 1503,  216, 1503, 1503, 1503, 1503,  216,  216, 1503,
     1503,  216,  422, 1503, 1503, 1503, 1503,  422, 1503,  422,
     1503, 1503,  422,  426, 1503, 1503, 1503, 1503,  426, 1503,
      426, 1503, 1503,  426,  432, 1503, 1503, 1503, 1503,  432,
     1503,  432, 1503, 1503,  432,  243,  243,  243,  243, 1503,
      243,  243,  243,  243,  243,  243,  243,  243,  434,  434,
     1503,  434,  434,  434,  434,  434,  434,  434,  434,  434,
      434,  434,  434,  434,  434,  434,  434,  434,  434,  249,
     1503,  249,  249, 1503,  249, 1503,  249, 1503,  249,  249,

     1503,  249,  249,  249,  249,  249,  249,  249,  249,  436,
      436, 1503,  436,  436,  436,  436,  436,  436,  436,  436,
      436,  436,  436,  436,  436,  436,  436,  436,  436,  436,
      286, 1503,  286,  286,  286,  286,  286,  286,  286,  286,
      473,  473, 1503,  473,  473,  473,  473,  473,  473,  473,
      473,  473,  473,  473,  473,  473,  473,  473,  473,  473,
      473,  488,  488,  488,  488,  488,  488,  488,  303, 1503,
     1503, 1503,  303, 1503,  303,  303,  303,  303,  303,  303,
      303,  303,  489,  489, 1503,  489,  489,  489,  489,  489,
      489,  489,  489,  489,  489,  489,  489,  489,  489,  489,

      489,  489,  489,  320, 1503, 1503, 1503,  320,  320,  320,
      321,  321, 1503,  321,  321,  321,  321,  321,  321,  321,
      321,  321,  321,  321,  321,  321,  321,  321,  321,  321,
      321,  328, 1503,  328, 1503, 1503, 1503, 1503,  328,  328,
     1503, 1503,  328,  513, 1503,  513,  513, 1503,  513,  330,
      330, 1503,  330,  330,  330,  330,  330,  330,  330,  330,
      330,  330,  330,  330,  330,  330,  330,  330,  330,  330,
      154, 1503, 1503,  154, 1503, 1503, 1503, 1503, 1503, 1503,
      154, 1503,  154,  154,  154,  154,  154,  154,  154,  154,
      386,  386,  386,  386, 1503,  386,  386,  386,  386,  386,

      386,  386,  386,  573,  573, 1503,  573,  573,  573,  573,
      573,  573,  573,  573,  573,  573,  573,  573,  573,  573,
      573,  573,  573,  573,  388, 1503,  388,  388,  388,  388,
      388,  388,  388,  388,  575,  575, 1503,  575,  575,  575,
      575,  575,  575,  575,  575,  575,  575,  575,  575,  575,
      575,  575,  575,  575,  575,  407, 1503,  407, 1503, 1503,
     1503, 1503,  407,  407, 1503, 1503,  407,  410,  410, 1503,
     1503,  410,  410,  410,  426, 1503, 1503, 1503, 1503,  426,
     1503,  426, 1503, 1503,  426,  422, 1503, 1503, 1503, 1503,
      422, 1503,  422, 1503, 1503,  422,  432, 1503, 1503, 1503,

     1503,  432, 1503,  432, 1503, 1503,  432,  434,  434, 1503,
      434,  434,  434,  434,  434,  434,  434,  434,  434,  434,
      434,  434,  434,  434,  434,  434,  434,  434,  436,  436,
     1503,  436,  436,  436,  436,  436,  436,  436,  436,  436,
      436,  436,  436,  436,  436,  436,  436,  436,  436,  249,
     1503,  249,  249, 1503,  249, 1503,  249, 1503,  249,  249,
     1503,  249,  249,  249,  249,  249,  249,  249,  249,  473,
      473, 1503,  473,  473,  473,  473,  473,  473,  473,  473,
      473,  473,  473,  473,  473,  473,  473,  473,  473,  473,
      673, 1503, 1503, 1503, 1503, 1503,  673, 1503,  673,  673,

      673,  673,  673,  673,  673,  673,  489,  489, 1503,  489,
      489,  489,  489,  489,  489,  489,  489,  489,  489,  489,
      489,  489,  489,  489,  489,  489,  489,  303, 1503, 1503,
     1503,  303, 1503,  303,  303,  303,  303,  303,  303,  303,
      303,  513, 1503,  513, 1503, 1503, 1503, 1503,  513,  513,
     1503, 1503,  513,  330,  330, 1503,  330,  330,  330,  330,
      330,  330,  330,  330,  330,  330,  330,  330,  330,  330,
      330,  330,  330,  330,  154, 1503, 1503,  154, 1503, 1503,
     1503, 1503, 1503, 1503,  154, 1503,  154,  154,  154,  154,
      154,  154,  154,  154,  708, 1503, 1503,  708, 1503,  708,

     1503,  708,  708, 1503,  708, 1503, 1503,  708,  708,  708,
      708,  708,  708,  708,  573,  573, 1503,  573,  573,  573,
      573,  573,  573,  573,  573,  573,  573,  573,  573,  573,
      573,  573,  573,  573,  573,  575,  575, 1503,  575,  575,
      575,  575,  575,  575,  575,  575,  575,  575,  575,  575,
      575,  575,  575,  575,  575,  575,  388, 1503,  388,  388,
      388,  388,  388,  388,  388,  388,  601, 1503, 1503, 1503,
      601,  601,  601,  436,  436, 1503,  436,  436,  436,  436,
      436,  436,  436,  436,  436,  436,  436,  436,  436,  436,
      436,  436,  436,  436,  249, 1503,  249,  249, 1503,  249,

     1503,  249, 1503,  249,  249, 1503,  249,  249,  249,  249,
      249,  249,  249,  249,  673, 1503, 1503, 1503, 1503, 1503,
      673, 1503,  673,  673,  673,  673,  673,  673,  673,  673,
      829,  829, 1503,  829,  829,  829,  829,  829,  829,  829,
      829,  829,  829,  829,  829,  829,  829,  829,  829,  829,
      829,  303, 1503,  303, 1503, 1503, 1503,  303, 1503,  303,
      303,  303,  303,  303,  303,  303,  303,  690, 1503, 1503,
     1503,  690,  690,  690,  330,  330, 1503,  330,  330,  330,
      330,  330,  330,  330,  330,  330,  330,  330,  330,  330,
      330,  330,  330,  330,  330,  154, 1503, 1503,  154, 1503,

     1503, 1503, 1503, 1503, 1503,  154, 1503,  154,  154,  154,
      154,  154,  154,  154,  154,  707, 1503,  707, 1503, 1503,
     1503, 1503,  707,  707, 1503, 1503,  707,  864, 1503,  864,
      864,  864,  864,  864,  864,  864,  864,  880,  880,  880,
      880,  880,  880,  880,  880,  880,  880,  880,  880,  880,
      880,  880,  880,  880,  880,  880,  880,  880,  388, 1503,
      388,  388,  388,  388,  388,  388,  388,  388,  764, 1503,
     1503, 1503,  764,  764,  764,  773, 1503, 1503, 1503, 1503,
     1503, 1503, 1503, 1503, 1503,  773,  773, 1503, 1503,  773,
      773,  773,  773,  779, 1503, 1503, 1503, 1503, 1503, 1503,

     1503, 1503, 1503,  779,  779, 1503, 1503,  779,  779,  779,
      779,  785, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503,
     1503,  785,  785, 1503, 1503,  785,  785,  785,  785,  436,
      436, 1503,  436,  436,  436,  436,  436,  436,  436,  436,
      436,  436,  436,  436,  436,  436,  436,  436,  436,  436,
      801, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503,
      801, 1503, 1503, 1503,  801,  801,  801,  249, 1503,  249,
      249, 1503,  249, 1503,  249, 1503,  249,  249, 1503,  249,
      249,  249,  249,  249,  249,  249,  249,  829,  829, 1503,
      829,  829,  829,  829,  829,  829,  829,  829,  829,  829,

      829,  829,  829,  829,  829,  829,  829,  829,  303, 1503,
     1503, 1503,  303, 1503,  303,  303,  303,  303,  303,  303,
      303,  303,  848, 1503, 1503, 1503,  848,  848,  848,  330,
      330, 1503,  330,  330,  330,  330,  330,  330,  330,  330,
      330,  330,  330,  330,  330,  330,  330,  330,  330,  330,
      154, 1503, 1503,  154, 1503, 1503, 1503, 1503, 1503, 1503,
      154, 1503,  154,  154,  154,  154,  154,  154,  154,  154,
      864, 1503,  864,  864,  864,  864,  864,  864,  864,  864,
     1005, 1005, 1503, 1005, 1005, 1005, 1005, 1005, 1005, 1005,
     1005, 1005, 1005, 1005, 1005, 1005, 1005, 1005, 1005, 1005,

     1005,  708, 1503, 1503,  708, 1503,  708, 1503,  708,  708,
     1503,  708, 1503, 1503,  708,  708,  708,  708,  708,  708,
      708, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014,
     1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014,
     1014, 1014,  388, 1503,  388,  388,  388,  388,  388,  388,
      388,  388,  911, 1503, 1503, 1503, 1503, 1503, 1503, 1503,
     1503, 1503,  911, 1503, 1503, 1503, 1503,  911, 1503, 1503,
      911,  919, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503,
     1503,  919, 1503, 1503, 1503, 1503,  919, 1503, 1503,  919,
      926, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503,

      926, 1503, 1503, 1503, 1503,  926, 1503, 1503,  926,  436,
      436, 1503,  436,  436,  436,  436,  436,  436,  436,  436,
      436,  436,  436,  436,  436,  436,  436,  436,  436,  436,
      249, 1503,  249,  249, 1503,  249, 1503,  249, 1503,  249,
      249, 1503,  249,  249,  249,  249,  249,  249,  249,  249,
      829,  829, 1503,  829,  829,  829,  829,  829,  829,  829,
      829,  829,  829,  829,  829,  829,  829,  829,  829,  829,
      829,  489,  489, 1503,  489,  489,  489,  489,  489,  489,
      489,  489,  489,  489,  489,  489,  489,  489,  489,  489,
      489,  489, 1088, 1088, 1503, 1088, 1088, 1088, 1088, 1088,

     1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088,
     1088, 1088, 1088,  303, 1503,  303, 1503, 1503, 1503,  303,
     1503,  303,  303,  303,  303,  303,  303,  303,  303,  330,
      330, 1503,  330,  330,  330,  330,  330,  330,  330,  330,
      330,  330,  330,  330,  330,  330,  330,  330,  330,  330,
      154, 1503, 1503,  154, 1503, 1503, 1503, 1503, 1503, 1503,
      154, 1503,  154,  154,  154,  154,  154,  154,  154,  154,
     1004, 1503, 1503, 1503, 1004, 1004, 1004, 1005, 1005, 1503,
     1005, 1005, 1005, 1005, 1005, 1005, 1005, 1005, 1005, 1005,
     1005, 1005, 1005, 1005, 1005, 1005, 1005, 1005,  388, 1503,

      388,  388,  388,  388,  388,  388,  388,  388, 1042, 1503,
     1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1042, 1503,
     1503, 1503, 1042, 1042, 1042, 1503, 1042, 1046, 1503, 1503,
     1503, 1503, 1503, 1503, 1503, 1503, 1503, 1046, 1503, 1503,
     1503, 1046, 1046, 1046, 1503, 1046, 1050, 1503, 1503, 1503,
     1503, 1503, 1503, 1503, 1503, 1503, 1050, 1503, 1503, 1503,
     1050, 1050, 1050, 1503, 1050,  249, 1503,  249,  249, 1503,
      249, 1503,  249, 1503,  249,  249, 1503,  249,  249,  249,
      249,  249,  249,  249,  249,  829,  829, 1503,  829,  829,
      829,  829,  829,  829,  829,  829,  829,  829,  829,  829,

      829,  829,  829,  829,  829,  829,  489,  489, 1503,  489,
      489,  489,  489,  489,  489,  489,  489,  489,  489,  489,
      489,  489,  489,  489,  489,  489,  489, 1088, 1088, 1503,
     1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088,
     1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088,  303, 1503,
     1503, 1503,  303, 1503,  303, 1503, 1503, 1503,  303, 1503,
      303,  303,  303,  303,  303,  303,  303,  303, 1387, 1387,
     1387, 1387, 1387, 1387, 1387, 1387, 1387, 1387, 1387, 1387,
     1387, 1387, 1387, 1387, 1387, 1387, 1387, 1387, 1387,   15,
     1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503,

     1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503,
     1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503,
     1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503,
     1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503,
     1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503
    } ;

static yyconst short int yy_chk[9349] =
    {   0,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    3,    3,
       32,   32,    3,    3,   13,   14, 1498,    3,    3,    3,
        3,    3,    3,    3,    3,    3,    3,    3,    3,    3,
        3,    3,    3,    3,    5,    5,    3,    5,    6,    6,
       31,    6,   13,   14,   25,   25,  619,   25,   34,   34,

       25,  619,   62,   25,   62,   62, 1496,   62,   64,   64,
       25,   31,   25,    3,    7,    7,    7,    7,    7,    7,
        7,    7,    7,    7,    7,    7,    7,    7,    7,    7,
        7,    7,    7,    7,    7,    7,    7,    7,    7,    7,
        7,    7,    7,    7,    7,    7,    7,    7,    7,    7,
        7,    7,    7,    7,    7,    7,    7,    7,    7,    7,
        7,    7,    7,    7,    7,    7,    7,    7,    7,    7,
        7,    7,    9,    9,    9,    9,    9,    9,    9,    9,
        9,    9,    9,    9,    9,    9,    9,    9,    9,    9,
        9,    9,    9,    9,    9,    9,    9,    9,    9,    9,

        9,    9,    9,    9,    9,    9,    9,    9,    9,    9,
        9,    9,    9,    9,    9,    9,    9,    9,    9,    9,
        9,    9,    9,    9,    9,    9,    9,    9,    9,    9,
       11,   11, 1489,   11,   29,   29,   29,   29,   29,   29,
       29,   66,   66,   84,   84,   86,   86,   11,   97,   97,
      118,  118,   99,   11,   11,   11,   11,   11,   11,   11,
       11,   11,   11,   11,   11,   11,   11,   11,   11,   11,
       11,   11,   11,   11,   11,   11,   11,   11,   19,   99,
       99,  119,   61, 1488,   94,   19,   19,   19,  119,   19,
       19,   37,   82,   94,   94,   94,   19,   94,  128,   37,

       19,   19,   27,   61,   27,   27,   27,   27,   27,   27,
       27,   69,   69,   82,   69,  128,   37,   69,  261,   37,
       69,   27,   27,   27,   98,   27,   27,   69,  146,   69,
      146,   38,   27,  261,   98,   98,   27,   27,   27,   38,
       27,   30,   39,   30,   30,   30,   30,   30,   30,   30,
       39,  120,   40,  265,   93,  120,   38,  265,   39,   38,
       40,   30,   93,   93,   30,   41,   42,   39,  145,  145,
       39,   30,   96,   41,   42,   38,   38,   40,   43,   44,
       40, 1479,   30,   96,   96,   96,   43,   44,   39,   39,
       41,   42,   40,   41,   42,  195,  199,  131,   40,   40,

       42,   41,   45,   43,   44,  202,   43,   44,  199,   42,
       45,   44,  195,   42,  131,   46,   47,   49,   43,  210,
       43,  210,   44,   46,   47,   49,   50,   45,  202,  131,
       45,   91,   46,   95,   50,   95,   45,   95,   95,   51,
       46,   47,   49,   46,   47,   49,   45,   51,  100,  231,
      231,   50,  100,  100,   50,  123,   47,   48,  259,   91,
       91,   91,   91,  123,   51,   48,   92,   51,   49,  123,
       92,   92,   92,   92,  129,   51,  102,  102,   50,   51,
      103,  103,   48,  102,  259,   48,  200,  101,  103,   48,
      206,  129, 1474,  134,  101,  101,   48,   48,  200,  101,

      101,  101,  129,   48,  101,  152,   48,   53,  154,   53,
      134,  206,  672,  152,  221,   53,  154,   53,  207,   53,
       53,  134,   53,   53,   53,   53,   53,   53,   53,  235,
      152,  235,  207,  154,   53,  221,  154,  672,   53,   53,
       53,   53,   53,   53,   53,   53,   53,   53,   53,   53,
       53,   53,   53,   53,   53,   53,   53,   53,   53,   53,
       53,   53,   53,   57,  463,   57,   57,   57,   57,   57,
       57,   57,   59,   59,   59,   59,   59,   59,   59,   60,
      463,   60,   60,   60,   60,   60,   60,   60,   60,   78,
      130,   78,   78,   78,   78,   78,   78,   78,  263,   60,

      196,  263,   60,  208,  233,  233,  258,  130,  258,   60,
       80,   80,   80,   80,   80,   80,   80,  208,  196,  196,
       60,   81, 1457,   81,   81,  130,   81,   81,   81,  250,
      250,   81,  132,   81,   81,   81,   81,   81,   81,   81,
       81,   81,   81,   81,  104,   81,   81,   81,  104,  132,
      133, 1455,  104,  104,   81,  135,   81,   81,  252,  252,
       81,   81,  197,  278,   81,  140,  132,  133,   81,  260,
       81,  278,  135,  140,  197,   81,  260,   81,   89,  140,
       89,  197,  140,   89,   89,  133,   89,  266,   89,  135,
       89,  266,   89,  136,  136,  136,  136,  136,  136,  136,

      275,  267,   89,   89,   89,  267,   89,  143,  143,  143,
      143,  143,  143,  143,  160,  144,  144,  144,  144,  144,
      144,  144,  160,  157,  209,  159,  209,  209,  143,  209,
      158,  157,  275,  159,   89,   90,  144,   90,  158,  160,
       90,   90,  160,   90,  161,   90,  159,   90,  157,   90,
      159,  157,  161,  159,  262,  158,  262,  162,  158,   90,
       90,   90,  264,   90,  273,  162,  273,  269,  160,  161,
      157,  198,  161,  163,  268,  158,  161,  264,  269,   90,
       90,  163,  162, 1427,  230,  162,  198,  270,  270,  268,
      198,   90,  155,  271,  230,  164,  230,  271,  163,  230,

      155,  163,  155,  164,  155,  155,  162,  155,  155,  155,
      155,  155,  155,  155,  155,  270,  165,  163,  166,  391,
      164,  201,  167,  164,  165,  201,  166,  164,  168,  170,
      167,  272,  272,  201,  169, 1426,  168,  170,  276,  201,
      276,  165,  169,  166,  165,  391,  166,  167,  170,  170,
      167,  281,  281,  168,  170,  171,  168,  170,  215,  169,
      168,  166,  169,  171,  172,  167,  173,  165,  174,  274,
      169,  277,  172,  277,  173,  284,  174,  255,  176,  177,
      171,  215,  284,  171,  274,  255,  176,  177,  215,  172,
     1425,  173,  172,  174,  173,  223,  174,  175,  171,  215,

      174,  178,  255,  176,  177,  175,  176,  177,  179,  178,
      172,  280,  175,  181,  280,  173,  179,  223,  280,  588,
      180,  181,  175,  176,  177,  175,  178,  182,  180,  178,
      223,  216,  303,  179,  223,  182,  179,  300,  181,  183,
      300,  181,  279,  184,  179,  180,  588,  183,  180,  303,
      185,  184,  182,  279,  216,  182,  178, 1424,  185,  181,
      180,  216,  283,  180,  183,  285,  283,  183,  184,  285,
      467,  184,  216,  467,  182,  185,  234,  236,  185,  187,
      187,  187,  183,  187,  187,  393,  234,  236,  234,  236,
      187,  234,  236,  185,  187,  187,  805,  184,  188,  190,

      190,  190,  190,  190,  190,  190,  393,  316,  188,  316,
      188,  188,  805,  188,  188,  188,  188,  188,  188,  188,
      189,  305,  189,  189,  189,  189,  189,  189,  189,  204,
      204,  204,  204,  204,  204,  204,  306,  395,  305,  189,
      189,  189,  305,  189,  189,  317,  317,  362,  362,  324,
      189,  363,  395,  306,  189,  189,  191,  324,  363,  191,
      191,  379,  379,  191,  191,  308,  191,  191,  191,  191,
      191,  191,  191,  191,  191,  191,  402,  306,  191,  191,
      191,  213,  308,  213,  213,  213,  213,  213,  213,  213,
      191,  329,  307,  329,  329,  402,  329,  191,  214,  214,

      214,  214,  214,  214,  214,  308,  381,  381,  191,  307,
      191,  219,  219,  219,  219,  219,  219,  219,  222,  222,
      364,  222,  222,  222,  364,  327,  222,  307,  222,  310,
      222,  222,  222,  222,  222,  222,  222,  222, 1412,  367,
      222,  222,  222,  309,  390,  311,  310,  367,  327,  456,
      392,  222,  222,  367,  392,  327,  222,  382,  456,  382,
      309,  390,  311,  222,  310,  222,  327,  377, 1384,  403,
      377,  403,  222,  238,  397,  238,  238,  309,  238,  238,
      238,  584,  397,  238,  311,  238,  328,  238,  318,  318,
      318,  318,  318,  318,  318,  238,  584,  238,  238,  238,

      319,  319,  319,  319,  319,  319,  319,  394,  238,  328,
      396,  394,  238,  238,  396,  400,  328,  377,  410,  401,
      238,  454,  238,  400,  398,  469,  413,  328,  413,  238,
      249,  401,  249,  454,  401,  249,  249,  469,  249,  410,
      249,  398,  249,  325,  249,  325,  325,  325,  325,  325,
      325,  325,  399,  406,  249,  249,  249,  449,  249,  326,
      326,  326,  326,  326,  326,  326,  331,  418,  417,  399,
      417,  640,  464,  332,  331,  449,  406,  418,  419,  418,
      640,  332,  418,  406, 1383,  448,  249,  256,  419,  464,
      419,  331,  448,  419,  406,  256,  331,  256,  332,  256,

      256,  332,  256,  256,  256,  256,  256,  256,  256,  256,
      451,  557,  256,  257,  557,  257,  332,  451,  257,  257,
      333,  257,  334,  257,  335,  257,  336,  257,  333,  507,
      334,  507,  335,  455,  336,  476,  337,  257,  257,  257,
      455,  257,  334,  476,  337,  333,  466,  334,  333,  335,
      334,  336,  335,  466,  336,  338,  488,  340,  490,  339,
      257,  337,  579,  338,  337,  340,  341,  339,  482,  257,
      337,  336,  333,  342,  341,  488,  482,  490,  450,  579,
      338,  342,  340,  338,  339,  340,  450,  339,  480,  343,
      494,  341,  494,  340,  341,  344,  480,  343,  342,  345,

      345,  342,  338,  344,  339,  586,  341,  345,  346,  494,
      345,  482,  586,  342,  343,  495,  346,  343,  347,  562,
      344,  562,  345,  344,  345,  450,  347,  345,  480,  348,
      450,  349,  495,  346,  343, 1382,  346,  348,  344,  349,
      346,  487,  495,  347,  483,  350,  347,  351,  566,  487,
      566,  347,  483,  350,  348,  351,  349,  348,  458,  349,
      350,  580, 1381,  352,  407,  627,  458,  580,  353,  349,
      350,  352,  351,  350,  354,  351,  353,  477,  355,  348,
      483,  487,  354,  351,  356,  477,  355,  407,  352,  357,
      458,  352,  356,  353,  407, 1403,  353,  357,  352,  354,

      626,  627,  354,  355,  629,  407,  355,  358,  478,  356,
      458, 1403,  356,  359,  357,  358,  478,  357,  353,  354,
      360,  359,  477,  475,  423,  356,  626,  581,  360,  357,
      583,  475,  358,  355,  423,  358,  423,  645,  359,  423,
      629,  359,  478,  358,  581,  360,  645,  583,  360,  370,
      370,  370,  370,  370,  370,  370,  360,  405,  405,  405,
      405,  405,  405,  405,  359,  369,  577,  369,  369,  369,
      369,  369,  369,  369,  404,  475,  404,  404,  404,  404,
      404,  404,  404,  486,  369,  369,  369,  656,  369,  369,
      577,  486,  594,  656,  594,  369,  582,  621,  484,  369,

      369,  371,  446,  641,  371,  371,  484,  641,  582,  371,
      446,  371,  371,  371,  371,  371,  371,  371,  371,  371,
      371,  621,  446,  371,  371,  371,  408,  408,  408,  408,
      408,  408,  408,  484,  587,  371, 1345,  598,  486,  598,
      492,  638,  371,  409,  409,  409,  409,  409,  409,  409,
      409,  587,  638,  371,  446,  371,  373,  492,  801,  373,
      373,  642,  492,  373,  373,  642,  373,  531,  373,  373,
      373,  373,  373,  373,  373,  373,  589,  531,  373,  373,
      373,  411,  411,  411,  411,  411,  411,  411,  589,  531,
      373,  412,  412,  412,  412,  412,  412,  412,  630,  493,

      630,  801,  411,  420,  420,  420,  420,  420,  420,  420,
      373,  383,  412,  673,  383,  383,  493,  653,  383,  383,
      493,  383,  653,  383,  424,  424,  424,  424,  424,  424,
      424, 1344,  673,  383,  383,  383,  427,  427,  427,  427,
      427,  427,  427,  429,  430,  430,  430,  430,  430,  430,
      430,  471,  635,  429,  498,  429,  585,  830,  429,  471,
      452,  687,  498,  687,  585,  383,  421,  440,  452,  440,
      440,  440,  440,  440,  440,  440,  648,  693,  830,  693,
      635,  421,  421,  421,  421,  421,  421,  421,  421,  441,
      441,  441,  441,  441,  441,  441,  452,  498,  459,  460,

      457,  457,  471,  471,  648,  453,  459,  460,  457,  421,
      421,  457,  452,  453,  462,  491,  461,  465,  468,  470,
      421,  425,  462,  457,  461,  465,  468,  470,  804,  462,
      651,  459,  491,  651,  604,  646,  425,  425,  425,  425,
      425,  425,  425,  425,  497,  453,  646,  650,  804,  460,
      459,  460,  457,  491,  461,  470,  604,  453,  650,  468,
      698,  497,  698,  606,  425,  425,  462,  465,  461,  465,
      468,  470,  698,  497,  472,  425,  428,  428,  604,  428,
      428,  428,  472,  512,  428,  606,  428, 1343,  428,  428,
      428,  428,  428,  428,  428,  428,  479,  481,  428,  428,

      428,  496,  623,  623,  479,  481,  512,  606,  623,  428,
      472,  485,  750,  512,  428,  625,  625,  636,  496,  485,
      625,  428,  647,  428,  512,  636,  472,  750, 1339,  647,
      428,  431,  502,  502,  502,  502,  502,  502,  502,  496,
      752,  479,  481,  742,  759,  742,  431,  431,  431,  431,
      431,  431,  431,  431,  759,  752,  485,  503,  503,  503,
      503,  503,  503,  503,  754,  514,  505,  505,  505,  505,
      505,  505,  505,  514,  431,  431,  506,  506,  506,  506,
      506,  506,  506,  754,  953,  431,  433,  505,  433,  433,
      514,  433,  433,  433,  953,  514,  433,  506,  433, 1410,

      433,  433,  433,  433,  433,  433,  433,  433,  433,  513,
      433,  433,  433,  757,  758, 1410,  521,  757,  433,  433,
      433,  433,  433,  433,  521,  433,  433,  654,  639,  433,
      643,  521,  513,  433,  654,  433,  639,  758,  643,  513,
      655,  521,  433,  437,  521,  437,  644,  655,  437,  437,
      513,  437,  954,  437,  644,  437,  510,  437,  510,  510,
      510,  510,  510,  510,  510,  751,  954,  437,  437,  437,
      808,  808,  751,  437,  511,  511,  511,  511,  511,  511,
      511,  520,  652,  659,  686,  657,  517, 1329,  753,  520,
      652,  659,  686,  657,  517,  753,  755,  756, 1328,  437,

      438,  809,  809,  755,  756,  761,  520,  761,  438,  520,
      438,  517,  438,  438,  517,  438,  438,  438,  438,  438,
      438,  438,  438,  442,  520,  522,  517,  523,  657,  524,
      676,  807,  676,  522, 1327,  523,  442,  524,  442,  442,
      442,  442,  442,  442,  442,  816,  682,  608,  682,  676,
      522,  807,  523,  522,  524,  523,  760,  524,  814,  442,
      522,  524,  811,  816,  760,  682,  442,  814,  792,  608,
      523,  526,  610,  525, 1326,  682,  792,  442,  444,  526,
      444,  525,  811,  444,  444,  527,  444,  529,  444,  528,
      444,  608,  444,  527,  610,  529,  526,  528,  525,  526,

     1229,  525,  444,  444,  444,  526,  444,  798,  525,  798,
      527,  612,  529,  527,  528,  529,  610,  528,  806, 1229,
      806,  444,  529,  530,  570,  570,  570,  570,  570,  570,
      570,  530,  527,  612,  444,  445,  528,  445,  813,  813,
      445,  445,  532,  445,  534,  445,  533,  445,  530,  445,
      532,  530,  534,  614,  533,  612,  817,  536,  530,  445,
      445,  445,  817,  445,  678,  536,  678,  532,  818,  534,
      532,  533,  534,  535,  533,  614,  532,  810,  533,  810,
      534,  535,  536,  678, 1325,  536,  818,  445,  535,  536,
      815,  445,  516,  815,  845,  837,  845,  614,  535,  827,

      516,  535,  516,  837,  516,  516,  678,  516,  516,  516,
      516,  516,  516,  516,  516,  590,  590,  590,  590,  590,
      590,  590,  516,  518,  827, 1171,  537,  728,  728,  839,
      861,  518,  861,  518,  537,  518,  518,  839,  518,  518,
      518,  518,  518,  518,  518,  903, 1171,  538,  518,  519,
      728,  537,  539,  903,  537,  538,  728,  519,  537,  519,
      539,  519,  519,  540,  519,  519,  519,  519,  519,  519,
      519,  540,  538, 1302,  519,  538,  649,  539,  905, 1231,
      539,  541,  542,  833,  649,  833,  543,  538,  540,  541,
      542,  540, 1231,  706,  543,  902,  544,  545, 1164,  902,

      905,  540,  833,  539,  544,  545,  541,  542,  649,  541,
      542,  543,  618, 1164,  543,  707,  706,  541,  542,  649,
      618,  544,  545,  706,  544,  545,  591,  591,  591,  591,
      591,  591,  591,  591,  706,  543,  559,  618,  707,  559,
      559, 1289,  618,  904,  559,  707,  559,  904,  559,  559,
      559,  559,  559,  559,  559,  559,  707,  901,  559,  559,
      559,  592,  592,  592,  592,  592,  592,  592, 1287,  955,
      559,  593,  593,  593,  593,  593,  593,  593,  677,  955,
      677,  901,  592,  599,  599,  599,  599,  599,  599,  599,
      559,  563,  593,  907,  563,  563,  906,  677,  912,  563,

      906,  563,  915,  563,  600,  600,  600,  600,  600,  600,
      600,  907,  677,  563,  563,  563,  602,  602,  602,  602,
      602,  602,  602, 1286,  680,  681,  680,  681,  688,  688,
      688,  688,  688,  688,  688,  689,  689,  689,  689,  689,
      689,  689, 1174,  680,  681,  563,  571,  920,  912,  571,
      571, 1226,  915,  571,  571,  680,  571, 1174,  571,  571,
      571,  571,  571,  571,  571,  571, 1226,  681,  571,  571,
      571,  691,  691,  691,  691,  691,  691,  691,  692,  692,
      692,  692,  692,  692,  692,  705,  705,  705,  705,  705,
      705,  705,  691,  914,  922,  914,  922,  920,  981,  692,

      571,  572,  703,  923,  572,  572,  981,  773,  572,  572,
      703,  572,  927,  572,  572,  572,  572,  572,  572,  572,
      572, 1456,  957,  572,  572,  572,  929,  703,  929,  773,
      703,  572,  572,  572,  572,  572,  572,  959,  959,  703,
      957,  930,  572,  699,  699,  699,  699,  699,  699,  699,
      773,  773, 1456,  923,  779,  572,  603,  603,  699,  603,
      603,  603,  927,  952,  603,  832,  603,  952,  603,  603,
      603,  603,  603,  603,  603,  603,  779,  711,  603,  603,
      603,  700,  832,  700,  700,  711,  700,  714,  719,  603,
      832,  930,  710,  700,  603,  714,  719,  779,  779,  958,

      710,  603,  711,  603,  958,  711, 1001,  700, 1001,  711,
      603,  605,  714,  719,  700,  714,  719,  710,  968,  714,
      710,  605,  968,  605,  605,  700,  605,  605,  605,  605,
      605,  605,  605,  609,  704, 1285,  704,  704,  704,  704,
      704,  704,  704,  609,  710,  609,  609,  834,  609,  609,
      609,  609,  609,  609,  609,  613,  743,  743,  743,  743,
      743,  743,  743, 1036,  834,  613, 1082,  613,  613, 1082,
      613,  613,  613,  613,  613,  613,  613,  616,  812,  616,
      616,  834,  616,  616,  616, 1036,  812,  616,  836,  616,
     1473,  616,  616,  616,  616,  616,  616,  616,  616,  616,

      713,  616,  616,  616, 1038,  836, 1473,  712,  713,  616,
      616,  616,  616,  616,  616,  712,  616,  616, 1227,  819,
      616, 1038,  836,  785,  616,  713,  616,  819,  713,  911,
      812,  967,  712,  616,  617,  712,  617,  617,  967,  617,
      617,  617, 1227,  712,  617,  785,  617, 1022,  617,  701,
      713,  701,  701, 1291,  701, 1022,  617, 1291,  617,  617,
      617,  701,  966,  966,  715,  911,  785,  785,  716,  617,
      717,  819,  715,  617,  617,  701,  716,  722,  717,  911,
      971,  617,  701,  617, 1039,  722, 1039, 1168,  971,  715,
      617,  624,  715,  716,  971,  717,  716, 1168,  717,  624,

     1284,  624,  722,  624,  624,  722,  624,  624,  624,  624,
      624,  624,  624,  624, 1181,  715,  624,  718, 1283,  716,
      717,  624,  633, 1041,  633,  718,  722,  633,  633,  720,
      633,  721,  633,  723,  633, 1181,  633,  720, 1043,  721,
     1043,  723,  718,  725,  724,  718,  633,  633,  633,  718,
      633,  725,  724, 1238,  720, 1037,  721,  720,  723,  721,
      880,  723,  633, 1037,  835,  913,  835,  723,  725,  724,
     1238,  725,  724, 1041,  721, 1282,  919,  725,  633,  634,
      720,  634,  880,  835,  634,  634,  726,  634,  880,  634,
      724,  634,  868,  634,  726,  835,  841,  841,  727,  727,

      868,  913, 1281,  634,  634,  634,  727,  634, 1047, 1184,
     1047,  726,  919, 1278,  726,  913, 1109,  868, 1184,  841,
      868,  727,  634,  727, 1109,  841,  919,  727,  746,  746,
      746,  746,  746,  746,  746,  634,  675,  675,  868,  675,
      675,  675,  675,  675,  675,  675,  675,  675,  675,  675,
      675,  675,  675,  675,  675,  675,  675,  675,  675,  675,
      675,  675,  675,  675,  675,  675,  675,  675,  675,  675,
      675,  675,  675,  675,  675,  675,  675,  675,  675,  675,
      675,  675,  675,  675,  675,  675,  675,  675,  675,  675,
      675,  675,  675,  675,  696,  762,  762,  762,  762,  762,

      762,  762,  696, 1121,  696, 1121,  696,  696, 1266,  696,
      696,  696,  696,  696,  696,  696,  696,  763,  763,  763,
      763,  763,  763,  763,  696,  697, 1240,  697,  697,  921,
      697,  697,  697,  697,  697,  697,  697,  697,  765,  765,
      765,  765,  765,  765,  765,  697,  702, 1251,  702,  702,
     1240,  702,  702,  702,  702,  702,  702,  702,  702,  744,
     1045, 1242,  744,  744, 1251,  921, 1042,  744, 1261,  744,
     1049,  744,  744,  744,  744,  744,  744,  744,  744,  921,
     1242,  744,  744,  744,  766,  766,  766,  766,  766,  766,
      766,  769, 1234,  769,  769,  769,  769,  769,  769,  769,

      770,  770,  770,  770,  770,  770,  770, 1234, 1225, 1042,
     1045,  840,  840,  744,  745, 1401, 1042,  745,  745,  840,
     1049,  918,  745, 1140,  745, 1140,  745,  745,  745,  745,
      745,  745,  745,  745,  840, 1401,  745,  745,  745,  926,
      840,  973,  870,  918,  745,  745,  745,  745,  745,  745,
      870,  879,  879, 1169,  775,  745,  775,  775,  775,  775,
      775,  775,  775, 1169, 1224,  918,  973,  870,  745,  747,
      870,  973,  747,  747,  879,  926,  747,  747,  870,  747,
      879,  747,  747,  747,  747,  747,  747,  747,  747,  926,
     1223,  747,  747,  747,  776,  776,  776,  776,  776,  776,

      776,  781, 1222,  781,  781,  781,  781,  781,  781,  781,
      782,  782,  782,  782,  782,  782,  782, 1130, 1141,  928,
     1141, 1255, 1244,  747,  749,  858, 1133,  749,  749,  925,
     1255,  749,  749,  858,  749, 1244,  749,  787,  787,  787,
      787,  787,  787,  787,  793,  974,  749,  749,  749,  885,
      858,  925,  793,  858,  793,  928,  793,  794,  794,  794,
      794,  794,  794,  794, 1178,  858,  793, 1130,  933,  928,
      974,  885,  794,  925, 1178,  974, 1133,  885,  749,  768,
      799,  799,  799,  799,  799,  799,  799,  800, 1288,  768,
      933,  768,  768,  885,  768,  768,  768,  768,  768,  768,

      768,  771,  800,  800,  800,  800,  800,  800,  800, 1197,
     1288, 1197,  933, 1084,  771, 1086,  771,  771,  771,  771,
      771,  771,  771,  842,  842,  842,  842,  842,  842,  842,
      843,  843,  843,  843,  843,  843,  843,  771, 1084,  866,
     1086, 1280, 1129, 1084,  771, 1086,  977,  866,  977, 1280,
     1221,  771, 1129, 1220, 1129,  771,  774,  846,  846,  846,
      846,  846,  846,  846,  866,  977,  774,  866,  774,  774,
     1046,  774,  774,  774,  774,  774,  774,  774,  777,  847,
      847,  847,  847,  847,  847,  847, 1219,  883,  883,  866,
      934,  777, 1129,  777,  777,  777,  777,  777,  777,  777,

      855,  855,  855,  855,  855,  855,  855, 1165, 1179, 1089,
      883, 1089,  934, 1046,  777,  855,  883, 1297, 1179,  867,
     1046,  777, 1297, 1165, 1165,  934, 1310,  867,  777,  934,
     1089, 1310,  777,  780,  934,  859,  859,  859,  859,  859,
      859,  859, 1050,  780,  867,  780,  780,  867,  780,  780,
      780,  780,  780,  780,  780,  783,  859,  860,  860,  860,
      860,  860,  860,  860, 1295, 1350,  886,  886,  783,  867,
      783,  783,  783,  783,  783,  783,  783, 1295,  860,  869,
     1014,  979, 1350,  979, 1028, 1050,  874,  869, 1136,  886,
     1233,  783, 1050,  873,  874,  886, 1233, 1228,  783, 1228,

      979,  873, 1014, 1293,  869,  783, 1028,  869, 1014,  783,
      786,  874, 1028, 1293,  874,  875,  876,  979,  873,  869,
      786,  873,  786,  875,  876,  786,  786,  786,  786,  786,
      786,  786,  786,  873, 1230,  978, 1230,  978, 1136, 1371,
      875,  876, 1236,  875,  876,  786, 1167,  875, 1236,  786,
      788, 1218,  788,  788,  978,  788,  788,  788, 1371, 1167,
      788,  876,  788, 1167,  788,  788,  788,  788,  788,  788,
      788,  788,  788, 1000,  788,  788,  788,  978, 1299, 1175,
      877, 1000,  788,  788,  788,  788,  788,  788,  877,  788,
      788, 1182, 1301,  788,  788, 1175, 1175,  788, 1000,  788,

     1232, 1000, 1232, 1299,  788,  877,  788,  790,  877, 1000,
      878,  878, 1115, 1217, 1301,  790, 1182,  790,  878,  790,
      790, 1182,  790,  790,  790,  790,  790,  790,  790,  790,
     1246,  877, 1235,  878, 1115,  878, 1246,  790,  791,  878,
     1115,  881,  881, 1019,  984,  984,  791, 1235,  791,  881,
      791,  791,  984,  791,  791,  791,  791,  791,  791,  791,
      791,  980, 1216,  980,  881, 1019,  881,  984,  791,  795,
      881, 1019, 1177,  984, 1241, 1007, 1241,  795, 1215,  795,
      980,  795,  795, 1007,  795, 1177, 1239, 1019,  980, 1177,
     1408,  795,  898,  898,  898,  898,  898,  898,  898, 1023,

     1007, 1239, 1243, 1007, 1243,  795, 1245, 1023, 1245, 1023,
     1408, 1023,  795,  908,  908,  908,  908,  908,  908,  908,
     1247, 1023, 1323,  795,  796,  909,  909,  909,  909,  909,
      909,  909,  796, 1090,  796, 1247,  796,  796, 1214,  796,
      985,  985, 1090, 1323, 1090, 1237,  796,  943,  943,  943,
      943,  943,  943,  943, 1347, 1237, 1300, 1204, 1237, 1347,
      796, 1090,  943,  985,  986,  986, 1300,  796,  797,  985,
      797,  797,  986,  797,  797,  797,  797,  797,  797,  797,
      946,  946,  946,  946,  946,  946,  946,  986,  797,  802,
      947,  802, 1132,  986,  802,  802, 1304,  802, 1190,  802,

     1304,  802, 1132,  802, 1132,  947,  947,  947,  947,  947,
      947,  947, 1248,  802,  802,  802, 1290,  802,  964,  964,
      964, 1119,  964,  964,  987,  987,  802, 1248, 1353,  964,
     1353, 1290, 1312,  964,  964,  988,  988,  988,  988,  988,
      988,  988, 1132, 1119, 1249,  802,  803,  987,  803, 1119,
     1249,  803,  803,  987,  803, 1308,  803, 1312,  803, 1187,
      803,  989,  989,  989,  989,  989,  989,  989, 1308, 1252,
      803,  803,  803, 1161,  803,  992,  992,  992,  992,  992,
      992,  992,  993,  993,  993,  993,  993,  993,  993, 1292,
      992, 1349, 1160, 1364, 1252, 1364, 1349,  993,  803, 1252,

     1017, 1017,  803,  828, 1292,  828, 1002, 1002, 1002, 1002,
     1002, 1002, 1002,  828, 1250,  828, 1003, 1003, 1003, 1003,
     1003, 1003, 1003, 1017, 1250, 1020, 1020, 1250, 1166, 1017,
     1361, 1163, 1173, 1163, 1173,  828,  828,  828, 1166,  828,
      828, 1163, 1173, 1163, 1173, 1166,  828, 1361, 1020, 1159,
      828,  828,  831,  831, 1020,  831,  831,  831,  831,  831,
      831,  831,  831,  831,  831,  831,  831,  831,  831,  831,
      831,  831,  831,  831,  831,  831,  831,  831,  831,  831,
      831,  831,  831,  831,  831,  831,  831,  831,  831,  831,
      831,  831,  831,  831,  831,  831,  831,  831,  831,  831,

      831,  831,  831,  831,  831,  831,  831,  831,  831,  831,
      849,  849,  849,  849,  849,  849,  849, 1158, 1008, 1015,
     1015, 1330, 1094, 1094, 1294,  849, 1008, 1015, 1157, 1330,
     1094,  849,  850,  850,  850,  850,  850,  850,  850, 1294,
     1176, 1012, 1015, 1008, 1015, 1094, 1008,  850, 1015, 1012,
     1176, 1094, 1296,  850,  851, 1298,  851, 1176, 1296,  851,
      851,  851,  851,  851,  851,  851, 1012, 1008, 1156, 1012,
     1298, 1303, 1305, 1307,  851,  853,  853,  853,  853,  853,
      853,  853, 1155, 1009, 1012, 1195, 1303, 1305, 1307, 1306,
      853, 1009,  853,  853,  853,  853,  853,  853,  854, 1306,

      854,  854,  854,  854,  854,  854,  854, 1195, 1009, 1095,
     1095, 1009, 1346, 1195, 1311,  854,  856, 1009,  856,  856,
      856,  856,  856,  856,  856, 1346, 1011, 1013, 1208, 1311,
     1154, 1091, 1095,  856, 1011, 1013, 1185, 1309, 1095,  856,
     1091, 1270, 1091, 1309, 1351, 1185,  856, 1185, 1348, 1351,
     1208, 1011, 1013, 1153, 1011, 1013, 1208,  856,  871, 1091,
     1011, 1348, 1313, 1270, 1185, 1316,  871, 1013,  871, 1270,
      871,  871, 1313,  871,  871,  871,  871,  871,  871,  871,
     1316, 1152, 1091,  871,  872, 1040, 1040, 1040, 1040, 1040,
     1040, 1040,  872, 1352,  872, 1319,  872,  872, 1352,  872,

      872,  872,  872,  872,  872,  872, 1092, 1497, 1319,  872,
      884,  884, 1319, 1355, 1274, 1092, 1497, 1092,  884, 1358,
      884, 1355,  884,  884, 1358,  884,  884,  884,  884,  884,
      884,  884,  884,  884, 1092, 1170, 1274, 1170, 1366,  884,
      899, 1092, 1274,  899,  899, 1170, 1366, 1357,  899, 1151,
      899, 1170,  899,  899,  899,  899,  899,  899,  899,  899,
     1357, 1149,  899,  899,  899, 1044, 1044, 1044, 1044, 1044,
     1044, 1044, 1048, 1048, 1048, 1048, 1048, 1048, 1048, 1052,
     1110, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1110, 1414,
     1110, 1320, 1110, 1414,  899,  900, 1321, 1148,  900,  900,

     1147, 1320, 1110,  900, 1317,  900, 1321,  900, 1096, 1096,
     1096, 1096, 1096, 1096, 1096, 1332, 1332,  900,  900,  900,
     1317, 1317, 1354, 1096, 1097, 1097, 1097, 1097, 1097, 1097,
     1097, 1100, 1100, 1100, 1100, 1100, 1100, 1100, 1332, 1097,
     1365, 1356, 1367, 1354, 1332, 1359, 1100, 1356, 1367,  900,
      935, 1104, 1104, 1104, 1104, 1104, 1104, 1104, 1359, 1360,
      935, 1365,  935,  935, 1360,  935,  935,  935,  935,  935,
      935,  935,  936, 1146,  936,  936, 1362,  936,  936,  936,
     1363, 1362,  936, 1397,  936, 1363,  936, 1101, 1101, 1101,
     1101, 1101, 1101, 1101,  936, 1107,  936,  936,  936, 1370,

     1318, 1370, 1101, 1107, 1372, 1397, 1372,  936, 1127, 1380,
     1318,  936,  936, 1369, 1103, 1135,  936, 1318, 1137,  936,
     1107,  936, 1103, 1107, 1256, 1135, 1380, 1135,  936,  937,
      937,  937,  937,  937,  937,  937, 1374, 1369, 1374, 1103,
     1137, 1107, 1103, 1124,  937, 1124, 1124, 1373, 1124, 1335,
      937,  938,  938,  938,  938,  938,  938,  938, 1256, 1398,
     1373, 1398, 1137, 1103, 1256, 1135,  938, 1256, 1137, 1124,
     1475, 1335,  938,  939, 1256,  939, 1124, 1335,  939,  939,
      939,  939,  939,  939,  939, 1105, 1105, 1105, 1105, 1105,
     1105, 1105, 1368,  939,  941,  941,  941,  941,  941,  941,

      941, 1475, 1262, 1123, 1138, 1123, 1123, 1368, 1123,  941,
     1262,  941,  941,  941,  941,  941,  941,  942, 1376,  942,
      942,  942,  942,  942,  942,  942, 1138, 1262, 1342, 1123,
     1262, 1210, 1126, 1376,  942,  944, 1123,  944,  944,  944,
      944,  944,  944,  944, 1400, 1377, 1400, 1123, 1138, 1315,
     1342, 1315,  944, 1210, 1138, 1502, 1342, 1375,  944, 1315,
     1377, 1315, 1387, 1375, 1502,  944, 1128, 1128, 1128, 1128,
     1128, 1128, 1128, 1413, 1210, 1210,  944,  949, 1279,  949,
     1378, 1210,  949,  949, 1387,  949, 1378,  949, 1413,  949,
     1387,  949, 1131, 1131, 1131, 1131, 1131, 1131, 1131, 1125,

     1279,  949,  949,  949, 1415,  949, 1134, 1134, 1134, 1134,
     1134, 1134, 1134, 1180, 1379, 1180, 1402,  949, 1402, 1415,
     1399, 1186, 1279, 1180, 1379, 1396, 1399, 1379, 1279, 1180,
     1186, 1098, 1186,  949,  950, 1322,  950, 1322, 1420,  950,
      950, 1257,  950, 1420,  950, 1322,  950, 1396,  950, 1186,
     1257, 1322, 1257, 1396, 1405, 1186, 1405, 1191,  950,  950,
      950, 1186,  950, 1093, 1186, 1191, 1407, 1088, 1407, 1257,
     1404, 1186, 1188, 1188, 1188, 1188, 1188, 1188, 1188, 1409,
     1257, 1409, 1191, 1411,  950, 1191, 1083, 1188, 1386, 1386,
      950,  963, 1404,  963, 1189, 1189, 1189, 1189, 1189, 1189,

     1189,  963, 1191,  963, 1406, 1411, 1331, 1331, 1416, 1189,
     1406, 1386, 1422, 1418, 1331, 1417, 1419, 1386, 1416, 1081,
     1444, 1421, 1419,  963,  963,  963, 1418,  963,  963, 1331,
     1417, 1331, 1423, 1444,  963, 1331, 1421, 1422,  963,  963,
      975,  975, 1423,  975,  975,  975,  975,  975,  975,  975,
      975,  975,  975,  975,  975,  975,  975,  975,  975,  975,
      975,  975,  975,  975,  975,  975,  975,  975,  975,  975,
      975,  975,  975,  975,  975,  975,  975,  975,  975,  975,
      975,  975,  975,  975,  975,  975,  975,  975,  975,  975,
      975,  975,  975,  975,  975,  975,  975,  975,  991, 1440,

      991, 1258, 1443,  991,  991,  991,  991,  991,  991,  991,
     1258, 1438, 1258, 1441, 1440, 1446, 1080, 1443,  991,  994,
      994,  994,  994,  994,  994,  994, 1439, 1431, 1446, 1258,
     1079, 1438, 1439, 1441,  994, 1431,  994,  994,  994,  994,
      994,  994, 1451, 1463, 1451, 1463, 1258,  994,  995,  995,
      995,  995,  995,  995,  995, 1437, 1200, 1452, 1200, 1200,
     1442, 1200, 1199,  995, 1199, 1199, 1442, 1199, 1467,  995,
      996,  996,  996,  996,  996,  996,  996, 1437, 1452, 1445,
     1078, 1447, 1200, 1437, 1445,  996, 1447, 1448, 1199, 1200,
     1467,  996,  997, 1077,  997, 1199, 1259,  997,  997,  997,

      997,  997,  997,  997, 1448, 1259, 1199, 1259, 1468, 1076,
     1468, 1260,  997,  999,  999,  999,  999,  999,  999,  999,
     1260, 1449, 1260, 1454, 1259, 1470, 1449, 1470,  999, 1454,
      999,  999,  999,  999,  999,  999, 1018, 1018, 1450, 1260,
     1075, 1469, 1259, 1450, 1018, 1074, 1018, 1469, 1018, 1018,
     1260, 1018, 1018, 1018, 1018, 1018, 1018, 1018, 1018, 1018,
     1453, 1472, 1073, 1472, 1072, 1018, 1021, 1021, 1453, 1385,
     1385, 1390, 1390, 1471, 1021, 1487, 1021, 1385, 1021, 1021,
     1461, 1021, 1021, 1021, 1021, 1021, 1021, 1021, 1021, 1021,
     1487, 1071, 1385, 1471, 1390, 1021, 1024, 1485, 1385, 1070,

     1390, 1392, 1461, 1393, 1393, 1429, 1429, 1069, 1461, 1068,
     1024, 1024, 1024, 1024, 1024, 1024, 1024, 1485, 1024, 1388,
     1388, 1067, 1066, 1392, 1024, 1025, 1393, 1388, 1429, 1392,
     1483, 1432, 1393, 1025, 1429, 1025, 1054, 1025, 1025, 1432,
     1025, 1432, 1388, 1432, 1388, 1392, 1035, 1025, 1388, 1428,
     1428, 1516, 1483, 1432, 1486, 1516, 1516, 1428, 1483, 1034,
     1486, 1025, 1515, 1492, 1515, 1521, 1521, 1515, 1025, 1033,
     1521, 1465, 1428, 1465, 1465, 1032, 1465, 1501, 1428, 1025,
     1026, 1466, 1031, 1466, 1466, 1492, 1466, 1030, 1026, 1029,
     1026, 1492, 1026, 1026, 1006, 1026, 1523, 1465, 1523, 1501,

     1005, 1523, 1026, 1004, 1465, 1501, 1524, 1466, 1530,  998,
     1524, 1524, 1530, 1530, 1466, 1465, 1026, 1528,  983, 1528,
      976,  972, 1528, 1026, 1027, 1540, 1547, 1540, 1547,  970,
     1540, 1547, 1027, 1553, 1027, 1553, 1027, 1027, 1553, 1027,
     1027, 1027, 1027, 1027, 1027, 1027, 1027, 1051, 1548, 1556,
      969, 1556, 1548, 1548, 1556,  965, 1558, 1051, 1558, 1051,
     1051, 1558, 1051, 1051, 1051, 1051, 1051, 1051, 1051, 1053,
     1557, 1569,  962, 1569, 1557, 1557, 1569,  961, 1575,  960,
     1575,  956, 1053, 1575, 1053, 1053, 1053, 1053, 1053, 1053,
     1053, 1053, 1570,  951, 1576,  948, 1570, 1570, 1576, 1576,

      945, 1577, 1581, 1577, 1581, 1053, 1577, 1581,  940,  897,
     1582,  896, 1053, 1053, 1582, 1582, 1583,  895, 1583, 1053,
     1590, 1583, 1590, 1053, 1055, 1590, 1055, 1055,  894, 1055,
     1055, 1055, 1055, 1055, 1055, 1055, 1585, 1589, 1586,  893,
     1585, 1585, 1586, 1586, 1587,  892,  891, 1589, 1587, 1587,
     1055, 1591, 1589,  890,  889, 1591, 1591, 1055, 1596, 1598,
     1596, 1598, 1599, 1596, 1598,  888, 1599, 1599, 1055, 1056,
      887, 1056,  865,  864, 1056, 1056, 1056, 1056, 1056, 1056,
     1056, 1057,  857, 1057,  852,  848, 1057, 1057, 1057, 1057,
     1057, 1057, 1057, 1058,  838, 1058,  829,  826, 1058, 1058,

     1058, 1058, 1058, 1058, 1058, 1605, 1607, 1605, 1607, 1623,
     1605, 1607, 1651, 1623, 1623, 1058, 1058, 1058, 1058, 1058,
     1058,  825, 1651, 1613,  824, 1613, 1058, 1059, 1613, 1059,
     1651,  823, 1059, 1059, 1059, 1059, 1059, 1059, 1059, 1618,
     1622, 1618, 1622,  822, 1618, 1622, 1630, 1633, 1630, 1633,
      821, 1630, 1633, 1059, 1060,  820, 1060, 1654,  789, 1060,
     1060, 1060, 1060, 1060, 1060, 1060, 1631, 1654, 1634,  784,
     1631, 1631, 1634, 1634, 1636, 1654, 1636,  778,  772, 1636,
     1060, 1061,  764, 1061,  741,  740, 1061, 1061, 1061, 1061,
     1061, 1061, 1061, 1062,  739, 1062,  738,  737, 1062, 1062,

     1062, 1062, 1062, 1062, 1062, 1063, 1063, 1063, 1063, 1063,
     1063, 1063, 1637, 1646,  736, 1646, 1637, 1637, 1646, 1657,
      735,  734, 1063, 1063, 1063, 1063, 1063, 1063,  733, 1657,
     1650,  732, 1650, 1063, 1064, 1650, 1064, 1657,  731, 1064,
     1064,  729, 1064,  708, 1064, 1653, 1064, 1653, 1064, 1656,
     1653, 1656, 1664,  690, 1656,  685, 1664, 1664, 1064, 1064,
     1064,  684, 1064,  683,  674,  671,  670,  669,  668,  667,
     1064,  666,  665,  664,  663,  662,  661,  658,  637,  631,
      628,  622,  620,  601,  597,  578,  576,  575,  574,  573,
     1064, 1065,  569, 1065,  568,  565, 1065, 1065,  561, 1065,

      560, 1065,  558, 1065,  556, 1065,  555,  554,  553,  552,
      551,  550,  549,  548,  547, 1065, 1065, 1065,  546, 1065,
      515,  501,  500,  499,  489,  474,  473,  447,  443,  436,
      435,  434,  432,  426,  422,  389,  388,  387,  386,  385,
      380,  378,  376,  374,  372,  368,  366, 1065, 1085,  365,
     1085,  361,  330,  322,  321,  320,  315,  314, 1085,  313,
     1085,  312,  304,  301,  299,  298,  297,  296,  295,  294,
      293,  292,  291,  290,  289,  287,  286,  282, 1085,  254,
     1085, 1085, 1085,  253, 1085, 1085,  251,  248,  246,  244,
      243, 1085,  242,  232,  229, 1085, 1085, 1087,  227, 1087,

      224,  220,  211,  205,  194,  193,  192, 1087,  156, 1087,
      150,  149,  142,  141,  139,  137,  127,  125,  124,  122,
      121,  117,  115,  114,  111,  105,   88, 1087,   87, 1087,
     1087, 1087,   85, 1087, 1087,   75,   73,   68,   67,   65,
     1087,   56,   54,   52, 1087, 1087, 1099,   36, 1099,   35,
       33, 1099, 1099, 1099, 1099, 1099, 1099, 1099,   24,   23,
       20,   17,   15,    0,    0,    0, 1099, 1102, 1102, 1102,
     1102, 1102, 1102, 1102,    0,    0,    0,    0,    0,    0,
        0,    0, 1102,    0, 1102, 1102, 1102, 1102, 1102, 1102,
        0,    0,    0,    0,    0, 1102, 1111,    0,    0,    0,

        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
     1111, 1111, 1111, 1111, 1111, 1111, 1111,    0, 1111,    0,
        0,    0,    0,    0, 1111, 1112,    0,    0,    0,    0,
        0,    0,    0, 1112,    0, 1112,    0, 1112, 1112,    0,
     1112,    0,    0,    0,    0,    0,    0, 1112,    0,    0,
        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
        0, 1112,    0,    0,    0,    0,    0,    0, 1112,    0,
        0,    0,    0,    0,    0,    0,    0,    0,    0, 1112,
     1113,    0,    0,    0,    0,    0,    0,    0, 1113,    0,
     1113,    0, 1113, 1113,    0, 1113,    0,    0,    0,    0,

        0,    0, 1113,    0,    0,    0,    0,    0,    0,    0,
        0,    0,    0,    0,    0,    0, 1113,    0,    0,    0,
        0,    0,    0, 1113, 1114,    0,    0,    0,    0,    0,
        0,    0, 1114,    0, 1114,    0, 1114, 1114,    0, 1114,
     1114, 1114, 1114, 1114, 1114, 1114, 1114, 1116,    0,    0,
        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
        0, 1116, 1116, 1116, 1116, 1116, 1116, 1116,    0, 1116,
        0,    0,    0,    0,    0, 1116,    0,    0,    0,    0,
        0,    0, 1116, 1117,    0,    0,    0,    0,    0,    0,
        0,    0,    0,    0,    0,    0,    0, 1117, 1117, 1117,

     1117, 1117, 1117, 1117,    0, 1117,    0,    0,    0,    0,
        0, 1117,    0,    0,    0,    0,    0,    0, 1117, 1118,
        0, 1118, 1118,    0, 1118, 1118, 1118, 1118, 1118, 1118,
     1118, 1120,    0,    0,    0,    0,    0,    0,    0,    0,
        0,    0,    0,    0,    0, 1120, 1120, 1120, 1120, 1120,
     1120, 1120,    0, 1120,    0,    0,    0,    0,    0, 1120,
        0,    0, 1120, 1120, 1120, 1120, 1120, 1120, 1122,    0,
     1122, 1122,    0, 1122, 1122, 1122, 1122, 1122, 1122, 1122,
     1142,    0, 1142,    0,    0, 1142, 1142, 1142, 1142, 1142,
     1142, 1142, 1143,    0, 1143,    0,    0, 1143, 1143, 1143,

     1143, 1143, 1143, 1143, 1144,    0, 1144,    0,    0, 1144,
     1144, 1144, 1144, 1144, 1144, 1144, 1145,    0, 1145,    0,
        0, 1145, 1145, 1145, 1145, 1145, 1145, 1145, 1183, 1183,
     1183, 1183, 1183, 1183, 1183, 1183, 1183, 1183, 1183, 1183,
     1183, 1183, 1183, 1183, 1183, 1183, 1183, 1183, 1183, 1183,
     1183, 1183, 1183, 1183, 1192,    0,    0,    0,    0,    0,
        0,    0,    0,    0,    0,    0,    0,    0, 1192, 1192,
     1192, 1192, 1192, 1192, 1192,    0, 1192,    0,    0,    0,
        0,    0, 1192,    0,    0,    0,    0,    0,    0, 1192,
     1193,    0,    0,    0,    0,    0,    0,    0,    0,    0,

        0,    0,    0,    0, 1193, 1193, 1193, 1193, 1193, 1193,
     1193,    0, 1193,    0,    0,    0,    0,    0, 1193,    0,
        0,    0,    0,    0,    0, 1193, 1194,    0, 1194, 1194,
        0, 1194, 1194, 1194, 1194, 1194, 1194, 1194, 1196,    0,
        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
        0,    0, 1196, 1196, 1196, 1196, 1196, 1196, 1196,    0,
     1196,    0,    0,    0,    0,    0, 1196,    0,    0, 1196,
     1196, 1196, 1196, 1196, 1196, 1198,    0, 1198, 1198,    0,
     1198, 1198, 1198, 1198, 1198, 1198, 1198, 1201,    0, 1201,
     1201,    0, 1201, 1201, 1201, 1201, 1201, 1201, 1201, 1202,

        0, 1202, 1202,    0, 1202, 1202, 1202, 1202, 1202, 1202,
     1202, 1203,    0, 1203, 1203,    0, 1203, 1203, 1203, 1203,
     1203, 1203, 1203, 1205,    0, 1205, 1205,    0, 1205, 1205,
     1205, 1205, 1205, 1205, 1205,    0,    0,    0,    0,    0,
        0,    0,    0,    0,    0,    0,    0,    0,    0, 1205,
     1206,    0, 1206, 1206,    0, 1206, 1206, 1206, 1206, 1206,
     1206, 1206,    0,    0,    0,    0,    0,    0,    0,    0,
        0,    0,    0,    0,    0,    0, 1206, 1207,    0, 1207,
     1207,    0, 1207, 1207, 1207, 1207, 1207, 1207, 1207, 1209,
     1209, 1209, 1209, 1209, 1209, 1209,    0,    0,    0,    0,

        0,    0,    0,    0,    0,    0, 1209, 1209, 1209, 1209,
     1209, 1209, 1211,    0, 1211,    0,    0, 1211, 1211, 1211,
     1211, 1211, 1211, 1211, 1212,    0, 1212,    0,    0, 1212,
     1212, 1212, 1212, 1212, 1212, 1212, 1213,    0, 1213,    0,
        0, 1213, 1213, 1213, 1213, 1213, 1213, 1213, 1253,    0,
     1253,    0,    0,    0,    0,    0,    0,    0, 1253,    0,
     1253,    0,    0,    0,    0,    0,    0,    0,    0,    0,
        0,    0,    0,    0,    0,    0,    0,    0, 1253,    0,
     1253, 1253, 1253,    0, 1253, 1253,    0,    0,    0,    0,
        0, 1253,    0,    0,    0, 1253, 1253, 1254, 1254,    0,

     1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254,
     1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254,
     1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254,
     1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254,
     1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254,
     1254, 1254, 1254, 1254, 1254, 1263,    0, 1263, 1263,    0,
     1263, 1263, 1263, 1263, 1263, 1263, 1263, 1264,    0, 1264,
     1264,    0, 1264, 1264, 1264, 1264, 1264, 1264, 1264, 1265,
        0, 1265, 1265,    0, 1265, 1265, 1265, 1265, 1265, 1265,
     1265, 1267,    0, 1267, 1267,    0, 1267, 1267, 1267, 1267,

     1267, 1267, 1267,    0,    0,    0,    0,    0,    0,    0,
        0,    0,    0,    0,    0,    0,    0, 1267, 1268,    0,
     1268, 1268,    0, 1268, 1268, 1268, 1268, 1268, 1268, 1268,
        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
        0,    0,    0,    0, 1268, 1269,    0, 1269, 1269,    0,
     1269, 1269, 1269, 1269, 1269, 1269, 1269, 1271, 1271, 1271,
     1271, 1271, 1271, 1271,    0,    0,    0,    0,    0,    0,
        0,    0,    0,    0, 1271, 1271, 1271, 1271, 1271, 1271,
     1272,    0,    0,    0,    0,    0,    0,    0,    0,    0,
        0,    0,    0,    0, 1272, 1272, 1272, 1272, 1272, 1272,

     1272,    0, 1272,    0,    0,    0,    0,    0, 1272, 1273,
        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
        0,    0,    0, 1273, 1273, 1273, 1273, 1273, 1273, 1273,
        0, 1273,    0,    0,    0,    0,    0, 1273, 1275,    0,
     1275, 1275,    0, 1275, 1275, 1275, 1275, 1275, 1275, 1275,
     1276,    0, 1276, 1276,    0, 1276, 1276, 1276, 1276, 1276,
     1276, 1276, 1277,    0, 1277, 1277,    0, 1277, 1277, 1277,
     1277, 1277, 1277, 1277, 1333,    0,    0,    0,    0,    0,
        0,    0,    0,    0,    0,    0,    0,    0, 1333, 1333,
     1333, 1333, 1333, 1333, 1333,    0, 1333,    0,    0,    0,

        0,    0, 1333, 1334,    0,    0,    0,    0,    0,    0,
        0,    0,    0,    0,    0,    0,    0, 1334, 1334, 1334,
     1334, 1334, 1334, 1334,    0, 1334,    0,    0,    0,    0,
        0, 1334, 1336,    0, 1336, 1336,    0, 1336, 1336, 1336,
     1336, 1336, 1336, 1336, 1337,    0, 1337, 1337,    0, 1337,
     1337, 1337, 1337, 1337, 1337, 1337, 1338,    0, 1338, 1338,
        0, 1338, 1338, 1338, 1338, 1338, 1338, 1338, 1340,    0,
     1340, 1340,    0, 1340, 1340, 1340, 1340, 1340, 1340, 1340,
     1341,    0, 1341, 1341,    0, 1341, 1341, 1341, 1341, 1341,
     1341, 1341, 1391, 1391,    0,    0,    0,    0,    0,    0,

     1391,    0, 1391,    0, 1391, 1391,    0, 1391, 1391, 1391,
     1391, 1391, 1391, 1391, 1391, 1391,    0,    0,    0,    0,
        0, 1391, 1394,    0, 1394, 1394,    0, 1394, 1394, 1394,
     1394, 1394, 1394, 1394, 1395,    0, 1395, 1395,    0, 1395,
     1395, 1395, 1395, 1395, 1395, 1395, 1433,    0,    0,    0,
        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
     1433, 1433, 1433, 1433, 1433, 1433, 1433,    0, 1433,    0,
        0,    0,    0,    0, 1433, 1434,    0,    0,    0,    0,
        0,    0,    0, 1434,    0, 1434,    0, 1434, 1434,    0,
     1434,    0,    0,    0,    0,    0,    0, 1434,    0,    0,

        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
        0, 1434,    0,    0,    0,    0,    0,    0, 1434,    0,
        0,    0,    0,    0,    0,    0,    0,    0,    0, 1434,
     1435,    0,    0,    0,    0,    0,    0,    0, 1435,    0,
     1435,    0, 1435, 1435,    0, 1435,    0,    0,    0,    0,
        0,    0, 1435,    0,    0,    0,    0,    0,    0,    0,
        0,    0,    0,    0,    0,    0, 1435,    0,    0,    0,
        0,    0,    0, 1435, 1436,    0,    0,    0,    0,    0,
        0,    0, 1436,    0, 1436,    0, 1436, 1436,    0, 1436,
     1436, 1436, 1436, 1436, 1436, 1436, 1436, 1458,    0,    0,

        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
        0, 1458, 1458, 1458, 1458, 1458, 1458, 1458,    0, 1458,
        0,    0,    0,    0,    0, 1458,    0,    0,    0,    0,
        0,    0, 1458, 1459,    0,    0,    0,    0,    0,    0,
        0,    0,    0,    0,    0,    0,    0, 1459, 1459, 1459,
     1459, 1459, 1459, 1459,    0, 1459,    0,    0,    0,    0,
        0, 1459,    0,    0,    0,    0,    0,    0, 1459, 1460,
        0, 1460, 1460,    0, 1460, 1460, 1460, 1460, 1460, 1460,
     1460, 1462,    0,    0,    0,    0,    0,    0,    0,    0,
        0,    0,    0,    0,    0, 1462, 1462, 1462, 1462, 1462,

     1462, 1462,    0, 1462,    0,    0,    0,    0,    0, 1462,
        0,    0, 1462, 1462, 1462, 1462, 1462, 1462, 1464,    0,
     1464, 1464,    0, 1464, 1464, 1464, 1464, 1464, 1464, 1464,
     1476,    0, 1476, 1476,    0, 1476, 1476, 1476, 1476, 1476,
     1476, 1476, 1477,    0, 1477, 1477,    0, 1477, 1477, 1477,
     1477, 1477, 1477, 1477, 1478,    0, 1478, 1478,    0, 1478,
     1478, 1478, 1478, 1478, 1478, 1478, 1480,    0, 1480, 1480,
        0, 1480, 1480, 1480, 1480, 1480, 1480, 1480,    0,    0,
        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
        0,    0, 1480, 1481,    0, 1481, 1481,    0, 1481, 1481,

     1481, 1481, 1481, 1481, 1481,    0,    0,    0,    0,    0,
        0,    0,    0,    0,    0,    0,    0,    0,    0, 1481,
     1482,    0, 1482, 1482,    0, 1482, 1482, 1482, 1482, 1482,
     1482, 1482, 1484, 1484, 1484, 1484, 1484, 1484, 1484,    0,
        0,    0,    0,    0,    0,    0,    0,    0,    0, 1484,
     1484, 1484, 1484, 1484, 1484, 1490,    0,    0,    0,    0,
        0,    0,    0,    0,    0,    0,    0,    0,    0, 1490,
     1490, 1490, 1490, 1490, 1490, 1490,    0, 1490,    0,    0,
        0,    0,    0, 1490, 1491,    0,    0,    0,    0,    0,
        0,    0,    0,    0,    0,    0,    0,    0, 1491, 1491,

     1491, 1491, 1491, 1491, 1491,    0, 1491,    0,    0,    0,
        0,    0, 1491, 1493,    0, 1493, 1493,    0, 1493, 1493,
     1493, 1493, 1493, 1493, 1493, 1494,    0, 1494, 1494,    0,
     1494, 1494, 1494, 1494, 1494, 1494, 1494, 1495,    0, 1495,
     1495,    0, 1495, 1495, 1495, 1495, 1495, 1495, 1495, 1499,
        0, 1499, 1499,    0, 1499, 1499, 1499, 1499, 1499, 1499,
     1499, 1500,    0, 1500, 1500,    0, 1500, 1500, 1500, 1500,
     1500, 1500, 1500, 1504, 1504, 1504, 1504, 1504, 1504, 1504,
     1504, 1504, 1504, 1504, 1504, 1504, 1504, 1504, 1504, 1504,
     1504, 1504, 1504, 1504, 1505, 1505, 1505, 1505, 1505, 1505,

     1505, 1505, 1505, 1505, 1505, 1505, 1505, 1505, 1505, 1505,
     1505, 1505, 1505, 1505, 1505, 1506, 1506, 1506, 1506, 1506,
     1506, 1506, 1506, 1506, 1506, 1506, 1506, 1506, 1506, 1506,
     1506, 1506, 1506, 1506, 1506, 1506, 1507, 1507, 1507, 1507,
     1507, 1507, 1507, 1508, 1508, 1508, 1508,    0, 1508, 1508,
     1508, 1508, 1508, 1508, 1508, 1508, 1509,    0,    0, 1509,
        0,    0,    0,    0,    0,    0, 1509,    0, 1509, 1509,
     1509, 1509, 1509, 1509, 1509, 1509, 1510,    0, 1510, 1510,
        0, 1510, 1511, 1511, 1511, 1511,    0, 1511, 1511, 1511,
     1511, 1511, 1511, 1511, 1511, 1512,    0, 1512, 1512,    0,

     1512,    0, 1512,    0, 1512, 1512,    0, 1512, 1512, 1512,
     1512, 1512, 1512, 1512, 1512, 1513,    0, 1513, 1513, 1513,
     1513, 1513, 1513, 1513, 1513, 1514,    0,    0,    0, 1514,
        0, 1514, 1514, 1514, 1514, 1514, 1514, 1514, 1514, 1517,
     1517,    0, 1517, 1517, 1517, 1517, 1517, 1517, 1517, 1517,
     1517, 1517, 1517, 1517, 1517, 1517, 1517, 1517, 1517, 1517,
     1518, 1518,    0, 1518, 1518, 1518, 1518, 1518, 1518, 1518,
     1518, 1518, 1518, 1518, 1518, 1518, 1518, 1518, 1518, 1518,
     1518, 1519, 1519, 1519, 1519,    0, 1519, 1519, 1519, 1519,
     1519, 1519, 1519, 1519, 1520,    0, 1520, 1520, 1520, 1520,

     1520, 1520, 1520, 1520, 1522,    0, 1522, 1522,    0, 1522,
     1525,    0, 1525,    0,    0,    0,    0, 1525, 1525,    0,
        0, 1525, 1526,    0,    0,    0,    0, 1526,    0, 1526,
        0,    0, 1526, 1527,    0,    0,    0,    0, 1527,    0,
     1527,    0,    0, 1527, 1529,    0,    0,    0,    0, 1529,
        0, 1529,    0,    0, 1529, 1531, 1531, 1531, 1531,    0,
     1531, 1531, 1531, 1531, 1531, 1531, 1531, 1531, 1532, 1532,
        0, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
     1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1533,
        0, 1533, 1533,    0, 1533,    0, 1533,    0, 1533, 1533,

        0, 1533, 1533, 1533, 1533, 1533, 1533, 1533, 1533, 1534,
     1534,    0, 1534, 1534, 1534, 1534, 1534, 1534, 1534, 1534,
     1534, 1534, 1534, 1534, 1534, 1534, 1534, 1534, 1534, 1534,
     1535,    0, 1535, 1535, 1535, 1535, 1535, 1535, 1535, 1535,
     1536, 1536,    0, 1536, 1536, 1536, 1536, 1536, 1536, 1536,
     1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536,
     1536, 1537, 1537, 1537, 1537, 1537, 1537, 1537, 1538,    0,
        0,    0, 1538,    0, 1538, 1538, 1538, 1538, 1538, 1538,
     1538, 1538, 1539, 1539,    0, 1539, 1539, 1539, 1539, 1539,
     1539, 1539, 1539, 1539, 1539, 1539, 1539, 1539, 1539, 1539,

     1539, 1539, 1539, 1541,    0,    0,    0, 1541, 1541, 1541,
     1542, 1542,    0, 1542, 1542, 1542, 1542, 1542, 1542, 1542,
     1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542,
     1542, 1543,    0, 1543,    0,    0,    0,    0, 1543, 1543,
        0,    0, 1543, 1544,    0, 1544, 1544,    0, 1544, 1545,
     1545,    0, 1545, 1545, 1545, 1545, 1545, 1545, 1545, 1545,
     1545, 1545, 1545, 1545, 1545, 1545, 1545, 1545, 1545, 1545,
     1546,    0,    0, 1546,    0,    0,    0,    0,    0,    0,
     1546,    0, 1546, 1546, 1546, 1546, 1546, 1546, 1546, 1546,
     1549, 1549, 1549, 1549,    0, 1549, 1549, 1549, 1549, 1549,

     1549, 1549, 1549, 1550, 1550,    0, 1550, 1550, 1550, 1550,
     1550, 1550, 1550, 1550, 1550, 1550, 1550, 1550, 1550, 1550,
     1550, 1550, 1550, 1550, 1551,    0, 1551, 1551, 1551, 1551,
     1551, 1551, 1551, 1551, 1552, 1552,    0, 1552, 1552, 1552,
     1552, 1552, 1552, 1552, 1552, 1552, 1552, 1552, 1552, 1552,
     1552, 1552, 1552, 1552, 1552, 1554,    0, 1554,    0,    0,
        0,    0, 1554, 1554,    0,    0, 1554, 1555, 1555,    0,
        0, 1555, 1555, 1555, 1559,    0,    0,    0,    0, 1559,
        0, 1559,    0,    0, 1559, 1560,    0,    0,    0,    0,
     1560,    0, 1560,    0,    0, 1560, 1561,    0,    0,    0,

        0, 1561,    0, 1561,    0,    0, 1561, 1562, 1562,    0,
     1562, 1562, 1562, 1562, 1562, 1562, 1562, 1562, 1562, 1562,
     1562, 1562, 1562, 1562, 1562, 1562, 1562, 1562, 1563, 1563,
        0, 1563, 1563, 1563, 1563, 1563, 1563, 1563, 1563, 1563,
     1563, 1563, 1563, 1563, 1563, 1563, 1563, 1563, 1563, 1564,
        0, 1564, 1564,    0, 1564,    0, 1564,    0, 1564, 1564,
        0, 1564, 1564, 1564, 1564, 1564, 1564, 1564, 1564, 1565,
     1565,    0, 1565, 1565, 1565, 1565, 1565, 1565, 1565, 1565,
     1565, 1565, 1565, 1565, 1565, 1565, 1565, 1565, 1565, 1565,
     1566,    0,    0,    0,    0,    0, 1566,    0, 1566, 1566,

     1566, 1566, 1566, 1566, 1566, 1566, 1567, 1567,    0, 1567,
     1567, 1567, 1567, 1567, 1567, 1567, 1567, 1567, 1567, 1567,
     1567, 1567, 1567, 1567, 1567, 1567, 1567, 1568,    0,    0,
        0, 1568,    0, 1568, 1568, 1568, 1568, 1568, 1568, 1568,
     1568, 1571,    0, 1571,    0,    0,    0,    0, 1571, 1571,
        0,    0, 1571, 1572, 1572,    0, 1572, 1572, 1572, 1572,
     1572, 1572, 1572, 1572, 1572, 1572, 1572, 1572, 1572, 1572,
     1572, 1572, 1572, 1572, 1573,    0,    0, 1573,    0,    0,
        0,    0,    0,    0, 1573,    0, 1573, 1573, 1573, 1573,
     1573, 1573, 1573, 1573, 1574,    0,    0, 1574,    0, 1574,

        0, 1574, 1574,    0, 1574,    0,    0, 1574, 1574, 1574,
     1574, 1574, 1574, 1574, 1578, 1578,    0, 1578, 1578, 1578,
     1578, 1578, 1578, 1578, 1578, 1578, 1578, 1578, 1578, 1578,
     1578, 1578, 1578, 1578, 1578, 1579, 1579,    0, 1579, 1579,
     1579, 1579, 1579, 1579, 1579, 1579, 1579, 1579, 1579, 1579,
     1579, 1579, 1579, 1579, 1579, 1579, 1580,    0, 1580, 1580,
     1580, 1580, 1580, 1580, 1580, 1580, 1584,    0,    0,    0,
     1584, 1584, 1584, 1588, 1588,    0, 1588, 1588, 1588, 1588,
     1588, 1588, 1588, 1588, 1588, 1588, 1588, 1588, 1588, 1588,
     1588, 1588, 1588, 1588, 1592,    0, 1592, 1592,    0, 1592,

        0, 1592,    0, 1592, 1592,    0, 1592, 1592, 1592, 1592,
     1592, 1592, 1592, 1592, 1593,    0,    0,    0,    0,    0,
     1593,    0, 1593, 1593, 1593, 1593, 1593, 1593, 1593, 1593,
     1594, 1594,    0, 1594, 1594, 1594, 1594, 1594, 1594, 1594,
     1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594,
     1594, 1595,    0, 1595,    0,    0,    0, 1595,    0, 1595,
     1595, 1595, 1595, 1595, 1595, 1595, 1595, 1597,    0,    0,
        0, 1597, 1597, 1597, 1600, 1600,    0, 1600, 1600, 1600,
     1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600,
     1600, 1600, 1600, 1600, 1600, 1601,    0,    0, 1601,    0,

        0,    0,    0,    0,    0, 1601,    0, 1601, 1601, 1601,
     1601, 1601, 1601, 1601, 1601, 1602,    0, 1602,    0,    0,
        0,    0, 1602, 1602,    0,    0, 1602, 1603,    0, 1603,
     1603, 1603, 1603, 1603, 1603, 1603, 1603, 1604, 1604, 1604,
     1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604,
     1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1606,    0,
     1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1608,    0,
        0,    0, 1608, 1608, 1608, 1609,    0,    0,    0,    0,
        0,    0,    0,    0,    0, 1609, 1609,    0,    0, 1609,
     1609, 1609, 1609, 1610,    0,    0,    0,    0,    0,    0,

        0,    0,    0, 1610, 1610,    0,    0, 1610, 1610, 1610,
     1610, 1611,    0,    0,    0,    0,    0,    0,    0,    0,
        0, 1611, 1611,    0,    0, 1611, 1611, 1611, 1611, 1612,
     1612,    0, 1612, 1612, 1612, 1612, 1612, 1612, 1612, 1612,
     1612, 1612, 1612, 1612, 1612, 1612, 1612, 1612, 1612, 1612,
     1614,    0,    0,    0,    0,    0,    0,    0,    0,    0,
     1614,    0,    0,    0, 1614, 1614, 1614, 1615,    0, 1615,
     1615,    0, 1615,    0, 1615,    0, 1615, 1615,    0, 1615,
     1615, 1615, 1615, 1615, 1615, 1615, 1615, 1616, 1616,    0,
     1616, 1616, 1616, 1616, 1616, 1616, 1616, 1616, 1616, 1616,

     1616, 1616, 1616, 1616, 1616, 1616, 1616, 1616, 1617,    0,
        0,    0, 1617,    0, 1617, 1617, 1617, 1617, 1617, 1617,
     1617, 1617, 1619,    0,    0,    0, 1619, 1619, 1619, 1620,
     1620,    0, 1620, 1620, 1620, 1620, 1620, 1620, 1620, 1620,
     1620, 1620, 1620, 1620, 1620, 1620, 1620, 1620, 1620, 1620,
     1621,    0,    0, 1621,    0,    0,    0,    0,    0,    0,
     1621,    0, 1621, 1621, 1621, 1621, 1621, 1621, 1621, 1621,
     1624,    0, 1624, 1624, 1624, 1624, 1624, 1624, 1624, 1624,
     1625, 1625,    0, 1625, 1625, 1625, 1625, 1625, 1625, 1625,
     1625, 1625, 1625, 1625, 1625, 1625, 1625, 1625, 1625, 1625,

     1625, 1626,    0,    0, 1626,    0, 1626,    0, 1626, 1626,
        0, 1626,    0,    0, 1626, 1626, 1626, 1626, 1626, 1626,
     1626, 1627, 1627, 1627, 1627, 1627, 1627, 1627, 1627, 1627,
     1627, 1627, 1627, 1627, 1627, 1627, 1627, 1627, 1627, 1627,
     1627, 1627, 1628,    0, 1628, 1628, 1628, 1628, 1628, 1628,
     1628, 1628, 1629,    0,    0,    0,    0,    0,    0,    0,
        0,    0, 1629,    0,    0,    0,    0, 1629,    0,    0,
     1629, 1632,    0,    0,    0,    0,    0,    0,    0,    0,
        0, 1632,    0,    0,    0,    0, 1632,    0,    0, 1632,
     1635,    0,    0,    0,    0,    0,    0,    0,    0,    0,

     1635,    0,    0,    0,    0, 1635,    0,    0, 1635, 1638,
     1638,    0, 1638, 1638, 1638, 1638, 1638, 1638, 1638, 1638,
     1638, 1638, 1638, 1638, 1638, 1638, 1638, 1638, 1638, 1638,
     1639,    0, 1639, 1639,    0, 1639,    0, 1639,    0, 1639,
     1639,    0, 1639, 1639, 1639, 1639, 1639, 1639, 1639, 1639,
     1640, 1640,    0, 1640, 1640, 1640, 1640, 1640, 1640, 1640,
     1640, 1640, 1640, 1640, 1640, 1640, 1640, 1640, 1640, 1640,
     1640, 1641, 1641,    0, 1641, 1641, 1641, 1641, 1641, 1641,
     1641, 1641, 1641, 1641, 1641, 1641, 1641, 1641, 1641, 1641,
     1641, 1641, 1642, 1642,    0, 1642, 1642, 1642, 1642, 1642,

     1642, 1642, 1642, 1642, 1642, 1642, 1642, 1642, 1642, 1642,
     1642, 1642, 1642, 1643,    0, 1643,    0,    0,    0, 1643,
        0, 1643, 1643, 1643, 1643, 1643, 1643, 1643, 1643, 1644,
     1644,    0, 1644, 1644, 1644, 1644, 1644, 1644, 1644, 1644,
     1644, 1644, 1644, 1644, 1644, 1644, 1644, 1644, 1644, 1644,
     1645,    0,    0, 1645,    0,    0,    0,    0,    0,    0,
     1645,    0, 1645, 1645, 1645, 1645, 1645, 1645, 1645, 1645,
     1647,    0,    0,    0, 1647, 1647, 1647, 1648, 1648,    0,
     1648, 1648, 1648, 1648, 1648, 1648, 1648, 1648, 1648, 1648,
     1648, 1648, 1648, 1648, 1648, 1648, 1648, 1648, 1649,    0,

     1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1652,    0,
        0,    0,    0,    0,    0,    0,    0,    0, 1652,    0,
        0,    0, 1652, 1652, 1652,    0, 1652, 1655,    0,    0,
        0,    0,    0,    0,    0,    0,    0, 1655,    0,    0,
        0, 1655, 1655, 1655,    0, 1655, 1658,    0,    0,    0,
        0,    0,    0,    0,    0,    0, 1658,    0,    0,    0,
     1658, 1658, 1658,    0, 1658, 1659,    0, 1659, 1659,    0,
     1659,    0, 1659,    0, 1659, 1659,    0, 1659, 1659, 1659,
     1659, 1659, 1659, 1659, 1659, 1660, 1660,    0, 1660, 1660,
     1660, 1660, 1660, 1660, 1660, 1660, 1660, 1660, 1660, 1660,

     1660, 1660, 1660, 1660, 1660, 1660, 1661, 1661,    0, 1661,
     1661, 1661, 1661, 1661, 1661, 1661, 1661, 1661, 1661, 1661,
     1661, 1661, 1661, 1661, 1661, 1661, 1661, 1662, 1662,    0,
     1662, 1662, 1662, 1662, 1662, 1662, 1662, 1662, 1662, 1662,
     1662, 1662, 1662, 1662, 1662, 1662, 1662, 1662, 1663,    0,
        0,    0, 1663,    0, 1663,    0,    0,    0, 1663,    0,
     1663, 1663, 1663, 1663, 1663, 1663, 1663, 1663, 1665, 1665,
     1665, 1665, 1665, 1665, 1665, 1665, 1665, 1665, 1665, 1665,
     1665, 1665, 1665, 1665, 1665, 1665, 1665, 1665, 1665, 1503,
     1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503,

     1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503,
     1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503,
     1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503,
     1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503,
     1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503
    } ;

static yy_state_type yy_state_buf[YY_BUF_SIZE + 2], *yy_state_ptr;
static char *yy_full_match;
static int yy_lp;
static int yy_looking_for_trail_begin = 0;
static int yy_full_lp;
static int *yy_full_state;
#define YY_TRAILING_MASK 0x2000
#define YY_TRAILING_HEAD_MASK 0x4000
#define REJECT \
{ \
*yy_cp = yy_hold_char; /* undo effects of setting up yytext */ \
yy_cp = yy_full_match; /* restore poss. backed-over text */ \
yy_lp = yy_full_lp; /* restore orig. accepting pos. */ \
yy_state_ptr = yy_full_state; /* restore orig. state */ \
yy_current_state = *yy_state_ptr; /* restore curr. state */ \
++yy_lp; \
goto find_rule; \
}
#define yymore() yymore_used_but_not_detected
#define YY_MORE_ADJ 0
#define YY_RESTORE_YY_MORE_OFFSET
#ifndef YYLMAX
#define YYLMAX 8192
#endif

char yytext[YYLMAX];
char *yytext_ptr;
#line 1 "filt.l"
#define INITIAL 0
#line 5 "filt.l"

#include <stdio.h>
#ifdef HAVE_MALLOC_H
#include <malloc.h>
#endif
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
#include <ctype.h>
#include <string.h>
#include <math.h>
#include <file.h>
#include <macro.h>
#include <strtod.h>
#include <word.h>
#include <filter.h>

#define MAX_INCLUDE_DEPTH 100
#define SEGINC 1024
#define MASKINC 1024

#define LARGE_NUMBER 65536

/* must match regions.h */
#define PSTOP     -142857.142857

/* stolen from fitsy/xos.h */
#define X__PI     3.14159265358979323846
#define X_2PI     ( 2 * X__PI )
#define X_R2D     (X_2PI / 360.0)
#define X_R2H     (X_2PI /  24.0)
#define X_H2D     (360.0 /  24.0)

#define r2h(r)    ( (r) / X_R2H )
#define h2r(d)    ( (d) * X_R2H )
#define r2d(r)    ( (r) / X_R2D )
#define d2r(d)    ( (d) * X_R2D )
#define h2d(r)    ( (r) * X_H2D )
#define d2h(d)    ( (d) / X_H2D )

/* region types */
#define TY_ANNULUS   1
#define TY_BOX       2
#define TY_CIRCLE    3
#define TY_ELLIPSE   4
#define TY_FIELD     5
#define TY_LINE      6
#define TY_PANDA     7
#define TY_BPANDA    8
#define TY_CPANDA    9
#define TY_EPANDA    10
#define TY_PIE       11
#define TY_QTPIE     11
#define TY_POINT     12
#define TY_POLYGON   13
#define TY_IMAGEMASK 14

/* oft-used checks on argument and coord types */
#define XARG    ((narg % 2) == 1)
#define YARG    ((narg % 2) == 0)
#define POSARG  ((regid == TY_POLYGON) || (narg<=2))
#define ANGARG (((regid == TY_PANDA)   && (narg==3)) || \
                ((regid == TY_PANDA)   && (narg==4)) || \
                ((regid == TY_BPANDA)  && (narg==3)) || \
                ((regid == TY_BPANDA)  && (narg==4)) || \
                ((regid == TY_CPANDA)  && (narg==3)) || \
                ((regid == TY_CPANDA)  && (narg==4)) || \
                ((regid == TY_EPANDA)  && (narg==3)) || \
                ((regid == TY_EPANDA)  && (narg==4)) || \
                ((regid == TY_PIE)     && (narg>=3)) )

#define NUMARG (((regid == TY_PANDA)   && (narg==5))  || \
                ((regid == TY_PANDA)   && (narg==8))  || \
            ((regid == TY_BPANDA)  && (narg==5))  || \
                ((regid == TY_BPANDA)  && (narg==10)) || \
            ((regid == TY_CPANDA)  && (narg==5))  || \
                ((regid == TY_CPANDA)  && (narg==8))  || \
            ((regid == TY_BPANDA)  && (narg==5))  || \
                ((regid == TY_EPANDA)  && (narg==10)) )

#define SAVEANG ((regid == TY_BOX) || (regid == TY_ELLIPSE))
                
#define USEPHYS (filt->fhd->table && \
                (filt->type == TYPE_EVENTS) && !filt->evsect)

#define USEWCS  (gcoordsys && \
             strcmp(gcoordsys, "image") && strcmp(gcoordsys, "physical"))

#define WCSSIZE (iswcs(wcs) && (cdelt1!=0) && (cdelt2!=0))

/* format statements */
#define DFMT1 ",%f"
#define DFMT2 ",%f,%f"
#define DFMT4 ",%f,%f,%f,%f"
#define SFMT1 ",%s"
#define IFMT1 ",%d"

static YY_BUFFER_STATE include_stack[MAX_INCLUDE_DEPTH];
static int include_stack_ptr = 0;
static int parse_error = 0;

static int colargs;
static int filtlen;
static int radanglen;
static int initbindefs;
static int regtype;
static int regid;
static int laststart;
static int maxfiltseg;
static int setargs;
static int inexpr;
static int narg;
static int nparen;
static int nsparen;
static int nrparen;
static int nfiltseg;
static int nrange;
static int nroutine;
static int nshape;
static int nregion;
static int nmask;
static char *filter;
static char *radang;
static char *rangename;
static Filter filt;
static double lastd1;
static double lastd2;

static char lastarg[SZ_LINE];
static char regname[SZ_LINE];
static char colnames[2][SZ_LINE];
static char wcsnames[2][SZ_LINE];
static char macrobuf[SZ_LINE];
static char *rnames[] = {"annulus", "box", "circle", "ellipse", 
                         "line", "panda", "pie", "qtpie", "point",
                   "polygon", "field", "bpanda", "cpanda", "epanda", 
                   "imagemask",
                   NULL};
static int rargs[] =     {4,5,3,5,4,8,4,4,2,6,0,11,8,11,0,0};
static int vargs[] =     {'y','o','y','o',
                          'n','n','y','n','e',
                          'e','n', 'n', 'n', 'n', 'n',
                    '\0'};
struct WorldCoor *wcs=NULL;
static FiltSeg *filtseg=NULL;

static char sbuf[SZ_LINE];
static char saveang[SZ_LINE];
static char *fcoordsys=NULL;
static char *gcoordsys=NULL;
static char *tstr;
static double xpos, ypos;
static double xpix, ypix;
static double cdelt1, cdelt2, crot;
static double tlmin[2];
static double tlmax[2];
static double binsiz[2];
static double tltyp[2];
static double dval, dval2;
static int offscl;
static int xtype, ytype;

static int _FiltLexTypeCmp(const void *s1, const void *s2);
static int _FiltLexTypeMatch(int ftype, int ttype);
static int _FiltLexAccel _PRx((int n));
static int _FiltLexRegionPanda _PRx((void));
static int _FiltLexLcx _PRx((void));
static int _FiltLexArgCheck _PRx((char *name, int args));
static void _FiltLexOp _PRx((char *s));
static void _FiltLexTypeSet _PRx((int type));
static void _FiltLexNew _PRx((void));
static void _FiltLexParen _PRx((char *s));
static void _FiltLexCat _PRx((char *s));
static void _FiltLexRegionStart _PRx((int docols));
static void _FiltLexRegionEnd _PRx((void));
static void _FiltLexRangeAdd _PRx((char *xname, char *str, int type, int n));
static void _FiltLexArgSave _PRx((double dval));
static void _FiltLexSetWcs _PRx((char *s));
static void _FiltLexWcsCols _PRx((FITSHead header, char *name1, char *name2));
static void _FiltLexNum _PRx((int lcx));
static void _FiltLexEnd _PRx((void));
static void _FiltLexMake _PRx((void));
static char *_FiltLexGetWcs _PRx((void));
static int _FiltIncMask(FilterMask masks, int maxmask, int nmask);
static int _FiltFitsMask(char *filename, FilterMask *rmasks, FITSHead *rhead, int *nreg);
int _filterror _PRx((char *msg));
#define RLIST 1

#define RTINE 2

#define REG 3

#define AREG 4

#define INCLUDE 5

#define COMM 6

#line 3344 "lex.filt.c"

/* Macros after this point can all be overridden by user definitions in
 * section 1.
 */

#ifndef YY_SKIP_YYWRAP
#ifdef __cplusplus
extern "C" int yywrap YY_PROTO(( void ));
#else
extern int yywrap YY_PROTO(( void ));
#endif
#endif

#ifndef YY_NO_UNPUT
static void yyunput YY_PROTO(( int c, char *buf_ptr ));
#endif

#ifndef yytext_ptr
static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
#endif

#ifdef YY_NEED_STRLEN
static int yy_flex_strlen YY_PROTO(( yyconst char * ));
#endif

#ifndef YY_NO_INPUT
#ifdef __cplusplus
static int yyinput YY_PROTO(( void ));
#else
static int input YY_PROTO(( void ));
#endif
#endif

#if YY_STACK_USED
static int yy_start_stack_ptr = 0;
static int yy_start_stack_depth = 0;
static int *yy_start_stack = 0;
#ifndef YY_NO_PUSH_STATE
static void yy_push_state YY_PROTO(( int new_state ));
#endif
#ifndef YY_NO_POP_STATE
static void yy_pop_state YY_PROTO(( void ));
#endif
#ifndef YY_NO_TOP_STATE
static int yy_top_state YY_PROTO(( void ));
#endif

#else
#define YY_NO_PUSH_STATE 1
#define YY_NO_POP_STATE 1
#define YY_NO_TOP_STATE 1
#endif

#ifdef YY_MALLOC_DECL
YY_MALLOC_DECL
#else
#if __STDC__
#ifndef __cplusplus
#include <stdlib.h>
#endif
#else
/* Just try to get by without declaring the routines.  This will fail
 * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
 * or sizeof(void*) != sizeof(int).
 */
#endif
#endif

/* Amount of stuff to slurp up with each read. */
#ifndef YY_READ_BUF_SIZE
#define YY_READ_BUF_SIZE 8192
#endif

/* Copy whatever the last rule matched to the standard output. */

#ifndef ECHO
/* This used to be an fputs(), but since the string might contain NUL's,
 * we now use fwrite().
 */
#define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
#endif

/* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
 * is returned in "result".
 */
#ifndef YY_INPUT
#define YY_INPUT(buf,result,max_size) \
      if ( yy_current_buffer->yy_is_interactive ) \
            { \
            int c = '*', n; \
            for ( n = 0; n < max_size && \
                       (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
                  buf[n] = (char) c; \
            if ( c == '\n' ) \
                  buf[n++] = (char) c; \
            if ( c == EOF && ferror( yyin ) ) \
                  YY_FATAL_ERROR( "input in flex scanner failed" ); \
            result = n; \
            } \
      else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
              && ferror( yyin ) ) \
            YY_FATAL_ERROR( "input in flex scanner failed" );
#endif

/* No semi-colon after return; correct usage is to write "yyterminate();" -
 * we don't want an extra ';' after the "return" because that will cause
 * some compilers to complain about unreachable statements.
 */
#ifndef yyterminate
#define yyterminate() return YY_NULL
#endif

/* Number of entries by which start-condition stack grows. */
#ifndef YY_START_STACK_INCR
#define YY_START_STACK_INCR 25
#endif

/* Report a fatal error. */
#ifndef YY_FATAL_ERROR
#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
#endif

/* Default declaration of generated scanner - a define so the user can
 * easily add parameters.
 */
#ifndef YY_DECL
#define YY_DECL int yylex YY_PROTO(( void ))
#endif

/* Code executed at the beginning of each rule, after yytext and yyleng
 * have been set up.
 */
#ifndef YY_USER_ACTION
#define YY_USER_ACTION
#endif

/* Code executed at the end of each rule. */
#ifndef YY_BREAK
#define YY_BREAK break;
#endif

#define YY_RULE_SETUP \
      YY_USER_ACTION

YY_DECL
      {
      register yy_state_type yy_current_state;
      register char *yy_cp = NULL, *yy_bp = NULL;
      register int yy_act;

#line 234 "filt.l"


#line 3498 "lex.filt.c"

      if ( yy_init )
            {
            yy_init = 0;

#ifdef YY_USER_INIT
            YY_USER_INIT;
#endif

            if ( ! yy_start )
                  yy_start = 1;     /* first start state */

            if ( ! yyin )
                  yyin = stdin;

            if ( ! yyout )
                  yyout = stdout;

            if ( ! yy_current_buffer )
                  yy_current_buffer =
                        yy_create_buffer( yyin, YY_BUF_SIZE );

            yy_load_buffer_state();
            }

      while ( 1 )       /* loops until end-of-file is reached */
            {
            yy_cp = yy_c_buf_p;

            /* Support of yytext. */
            *yy_cp = yy_hold_char;

            /* yy_bp points to the position in yy_ch_buf of the start of
             * the current run.
             */
            yy_bp = yy_cp;

            yy_current_state = yy_start;
            yy_state_ptr = yy_state_buf;
            *yy_state_ptr++ = yy_current_state;
yy_match:
            do
                  {
                  register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
                  while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
                        {
                        yy_current_state = (int) yy_def[yy_current_state];
                        if ( yy_current_state >= 1504 )
                              yy_c = yy_meta[(unsigned int) yy_c];
                        }
                  yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
                  *yy_state_ptr++ = yy_current_state;
                  ++yy_cp;
                  }
            while ( yy_base[yy_current_state] != 9290 );

yy_find_action:
            yy_current_state = *--yy_state_ptr;
            yy_lp = yy_accept[yy_current_state];
find_rule: /* we branch to this label when backing up */
            for ( ; ; ) /* until we find what rule we matched */
                  {
                  if ( yy_lp && yy_lp < yy_accept[yy_current_state + 1] )
                        {
                        yy_act = yy_acclist[yy_lp];
                        if ( yy_act & YY_TRAILING_HEAD_MASK ||
                             yy_looking_for_trail_begin )
                              {
                              if ( yy_act == yy_looking_for_trail_begin )
                                    {
                                    yy_looking_for_trail_begin = 0;
                                    yy_act &= ~YY_TRAILING_HEAD_MASK;
                                    break;
                                    }
                              }
                        else if ( yy_act & YY_TRAILING_MASK )
                              {
                              yy_looking_for_trail_begin = yy_act & ~YY_TRAILING_MASK;
                              yy_looking_for_trail_begin |= YY_TRAILING_HEAD_MASK;
                              }
                        else
                              {
                              yy_full_match = yy_cp;
                              yy_full_state = yy_state_ptr;
                              yy_full_lp = yy_lp;
                              break;
                              }
                        ++yy_lp;
                        goto find_rule;
                        }
                  --yy_cp;
                  yy_current_state = *--yy_state_ptr;
                  yy_lp = yy_accept[yy_current_state];
                  }

            YY_DO_BEFORE_ACTION;


do_action:  /* This label is used only to access EOF actions. */


            switch ( yy_act )
      { /* beginning of action switch */
case 1:
YY_RULE_SETUP
#line 236 "filt.l"
{ _FiltLexCat(yytext); }
      YY_BREAK
case 2:
YY_RULE_SETUP
#line 238 "filt.l"
{ _FiltLexSetWcs(yytext); }
      YY_BREAK
case 3:
YY_RULE_SETUP
#line 240 "filt.l"
{ BEGIN COMM; }
      YY_BREAK
case 4:
YY_RULE_SETUP
#line 241 "filt.l"
{ BEGIN COMM; }
      YY_BREAK
case 5:
YY_RULE_SETUP
#line 242 "filt.l"
{ BEGIN COMM; }
      YY_BREAK
case 6:
YY_RULE_SETUP
#line 243 "filt.l"
{ 
            /* comment acts like EOL */
            if( YY_START == REG ){
            _FiltLexRegionEnd();
              _FiltLexNew(); 
            }
            else if( YY_START == RLIST ){
            _FiltLexParen(")");
            }
            else{
              _FiltLexNew(); 
            }
              BEGIN COMM;
}
      YY_BREAK
case 7:
YY_RULE_SETUP
#line 257 "filt.l"
{ BEGIN INITIAL; }
      YY_BREAK
case 8:
YY_RULE_SETUP
#line 258 "filt.l"
{ BEGIN INITIAL; }
      YY_BREAK
case 9:
YY_RULE_SETUP
#line 259 "filt.l"
{ /* ignore comments up to eol */ ; }
      YY_BREAK
case 10:
YY_RULE_SETUP
#line 261 "filt.l"
{ ; /* ignore */ }
      YY_BREAK
case 11:
YY_RULE_SETUP
#line 262 "filt.l"
{ ; /* ignore */ }
      YY_BREAK
case 12:
YY_RULE_SETUP
#line 263 "filt.l"
{ ; /* ignore */ }
      YY_BREAK
case 13:
*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
yy_c_buf_p = yy_cp = yy_bp + 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
#line 265 "filt.l"
{
            if( YY_START == REG ){
              _FiltLexRegionEnd();
              _FiltLexNew();
            }
            /* Found an asc-style region */
            colargs = 0;
            laststart = YY_START;
            BEGIN AREG;
}
      YY_BREAK
case 14:
YY_RULE_SETUP
#line 275 "filt.l"
{
            if( colargs > 2 )
              _filterror("illegal Chandra region (too many column args)");
            if( !(tstr=FilterSymbolEnter(filt, yytext)) )
              _filterror("missing column or header parameter");
            strcpy(colnames[colargs],tstr);
            colargs++;
}
      YY_BREAK
case 15:
YY_RULE_SETUP
#line 283 "filt.l"
{ ; }
      YY_BREAK
case 16:
YY_RULE_SETUP
#line 284 "filt.l"
{ ; }
      YY_BREAK
case 17:
YY_RULE_SETUP
#line 285 "filt.l"
{ ; }
      YY_BREAK
case 18:
YY_RULE_SETUP
#line 286 "filt.l"
{     
            /* end of asc part of region */
            if( colargs != 2 )
              _filterror("illegal Chandra region (wrong number of cols)");
            BEGIN INITIAL;
}
      YY_BREAK
case 19:
#line 294 "filt.l"
case 20:
YY_RULE_SETUP
#line 294 "filt.l"
{
            /* finish off previous */
            if( YY_START == REG ){
              _FiltLexRegionEnd();
              _FiltLexNew();
            }
            /* Found a region */
            BEGIN REG;
                if( filt->type == TYPE_EVENTS ){
              /* if asc-style, re-do wcs for specified columns */
              if( colargs == 2 ){
                _FiltLexRegionStart(2);
                    _FiltLexWcsCols(filt->fhd, colnames[0], colnames[1]);
                  }
              /* set up default columns */
                  else{
                _FiltLexRegionStart(1);
                  }
                }
                /* its an image */
                else{
              _FiltLexRegionStart(0);
                }
}
      YY_BREAK
case 21:
YY_RULE_SETUP
#line 318 "filt.l"
{
                /* can't happen */
            _filterror("invalid characters following the region name");
}
      YY_BREAK
case 22:
YY_RULE_SETUP
#line 322 "filt.l"
{
                narg++;
                /* process this pure number in the current coord system */
                _FiltLexNum(_FiltLexLcx());
}
      YY_BREAK
case 23:
YY_RULE_SETUP
#line 327 "filt.l"
{
                narg++;
                /* remove trailing unit character */
                yytext[strlen(yytext)-1] = '\0';
                /* process this  as a pure number in image coord sys */
                _FiltLexNum(LCX_IMAGE);
}
      YY_BREAK
case 24:
YY_RULE_SETUP
#line 334 "filt.l"
{
                narg++;
                /* remove trailing unit character */
                yytext[strlen(yytext)-1] = '\0';
                /* process this  as a pure number in physical coord sys */
                _FiltLexNum(LCX_PHYS);
}
      YY_BREAK
case 25:
YY_RULE_SETUP
#line 341 "filt.l"
{
            char *coordsys;
            if( nowcs(wcs) )
              _filterror("no WCS information in file");
                narg++;
            /* save x value for processing with y next time */
            if( XARG ){
              xpos = SAOstrtod(yytext,NULL);
              xtype = SAOdtype;
              if( (xtype !=0) && (xtype != '.') && (xtype != 'd') ){
                coordsys = _FiltLexGetWcs();
                /* arg1 coords are hms, but ecliptic, galactic are deg */
                if( !coordsys                             ||
                    (strncasecmp(coordsys, "ecl", 3)     &&
                   strncasecmp(coordsys, "gal", 3))    ){
                  xpos = h2d(xpos);
                }
              }
            }
            else{
              ypos = SAOstrtod(yytext,NULL);
              ytype = SAOdtype;
                  /* convert wcs to image pixels */
              wcsc2pix(wcs, xpos,ypos, _FiltLexGetWcs(), &xpix,&ypix,
                     &offscl);
                  /* convert to physical for single event filtering */
                  if( USEPHYS ){
                xpix = tli2p(xpix, tlmin[0], binsiz[0], tltyp[0]);
                ypix = tli2p(ypix, tlmin[1], binsiz[1], tltyp[1]);
                  }
              snprintf(sbuf, SZ_LINE, DFMT2, xpix, ypix);
              _FiltLexCat(sbuf);
            }
}
      YY_BREAK
case 26:
YY_RULE_SETUP
#line 375 "filt.l"
{
                narg++;
            /* handle position arguments */
            if( POSARG ){
              if( nowcs(wcs) )
                _filterror("no WCS information in file");
              /* save x value for processing with y next time */
              if( XARG ){
                xpos = strtod(yytext,NULL);
              }
              else{
                ypos = strtod(yytext,NULL);
                    /* convert wcs to image pixels */
                wcsc2pix(wcs, xpos, ypos, _FiltLexGetWcs(),
                          &xpix, &ypix, &offscl);
                    /* convert to physical for single event filtering */
                    if( USEPHYS ){
                  xpix = tli2p(xpix, tlmin[0], binsiz[0], tltyp[0]);
                  ypix = tli2p(ypix, tlmin[1], binsiz[1], tltyp[1]);
                    }
                snprintf(sbuf, SZ_LINE, DFMT2, xpix, ypix);
                _FiltLexCat(sbuf);
              }
            }
                /* angle arguments are just passed along, with updated crot */
            else if( ANGARG ){
              dval = strtod(yytext,NULL);
                  if( USEWCS ) dval += crot;
              snprintf(sbuf, SZ_LINE, DFMT1, dval);
              _FiltLexCat(sbuf);
                }
                /* panda numeric args are just passed along */
                else if( NUMARG ){
                  dval = strtod(yytext,NULL);
                  snprintf(sbuf, SZ_LINE, DFMT1, dval);
                  _FiltLexCat(sbuf);
                }
            /* handle size arguments */
            else{
              if( !WCSSIZE )
                _filterror("no WCS (or CDELT) information in file");
                  if( SAVEANG ){
                dval = strtod(yytext,NULL);
                    if( USEWCS ) dval += crot;
                snprintf(saveang, SZ_LINE, DFMT1, dval);
                  }
              /* arg 1 is ra, arg2 is dec */
              if( XARG )
                dval = ABS(strtod(yytext,NULL)/cdelt1);
              else
                dval = ABS(strtod(yytext,NULL)/cdelt2);
              snprintf(sbuf, SZ_LINE, DFMT1, dval);
              _FiltLexCat(sbuf);
              _FiltLexArgSave(dval);
            }
}
      YY_BREAK
case 27:
YY_RULE_SETUP
#line 431 "filt.l"
{
                narg++;
            /* handle position arguments */
            if( POSARG ){
              if( nowcs(wcs) )
                _filterror("no WCS information in file");
              /* save x value for processing with y next time */
              if( XARG ){
                xpos = r2d(strtod(yytext,NULL));
              }
              else{
                ypos = r2d(strtod(yytext,NULL));
                    /* convert wcs to image pixels */
                wcsc2pix(wcs, xpos, ypos, _FiltLexGetWcs(),
                          &xpix, &ypix, &offscl);
                    /* convert to physical for single event filtering */
                    if( USEPHYS ){
                  xpix = tli2p(xpix, tlmin[0], binsiz[0], tltyp[0]);
                  ypix = tli2p(ypix, tlmin[1], binsiz[1], tltyp[1]);
                    }
                snprintf(sbuf, SZ_LINE, DFMT2, xpix, ypix);
                _FiltLexCat(sbuf);
              }
            }
                /* angle arguments are just passed along, with updated crot */
            else if( ANGARG ){
              dval = r2d(strtod(yytext,NULL));
                  if( USEWCS ) dval += crot;
              snprintf(sbuf, SZ_LINE, DFMT1, dval);
              _FiltLexCat(sbuf);
                }
                /* panda numeric args are just passed along */
                else if( NUMARG ){
                  dval = strtod(yytext,NULL);
                  snprintf(sbuf, SZ_LINE, DFMT1, dval);
                  _FiltLexCat(sbuf);
                }
            /* handle size arguments */
            else{
              if( !WCSSIZE )
                _filterror("no WCS (or CDELT) information in file");
                  if( SAVEANG ){
                dval = r2d(strtod(yytext,NULL));
                    if( USEWCS ) dval += crot;
                snprintf(saveang, SZ_LINE, DFMT1, dval);
                  }
              /* arg 1 is ra, arg2 is dec */
              if( XARG )
                dval = r2d(ABS(strtod(yytext,NULL)/cdelt1));
              else
                dval = r2d(ABS(strtod(yytext,NULL)/cdelt2));
              snprintf(sbuf, SZ_LINE, DFMT1, dval);
              _FiltLexCat(sbuf);
              _FiltLexArgSave(dval);
            }
}
      YY_BREAK
case 28:
YY_RULE_SETUP
#line 487 "filt.l"
{
            if( !WCSSIZE )
              _filterror("no WCS (or CDELT) information in file");
                narg++;
            /* arg 1 is ra, arg2 is dec */
            if( XARG )
              dval = ABS(strtod(yytext,NULL)/(cdelt1*60.0));
            else
              dval = ABS(strtod(yytext,NULL)/(cdelt2*60.0));
            snprintf(sbuf, SZ_LINE, DFMT1, dval);
            _FiltLexCat(sbuf);
                _FiltLexArgSave(dval);
}
      YY_BREAK
case 29:
YY_RULE_SETUP
#line 500 "filt.l"
{
            if( !WCSSIZE )
              _filterror("no WCS (or CDELT) information in file");
                narg++;
            /* arg 1 is ra, arg2 is dec */
            if( XARG )
              dval = ABS(strtod(yytext,NULL)/(cdelt1*3600.0));
            else
              dval = ABS(strtod(yytext,NULL)/(cdelt2*3600.0));
            snprintf(sbuf, SZ_LINE, DFMT1, dval);
            _FiltLexCat(sbuf);
                _FiltLexArgSave(dval);
}
      YY_BREAK
case 30:
YY_RULE_SETUP
#line 513 "filt.l"
{
            int n;
            n = strtol(strchr(yytext, '=')+1, NULL, 10);
            if( n <=0 ){
              _filterror("invalid region accelerator");
            }
            else{
              if( !_FiltLexAccel(n) ){
                _filterror("invalid region accelerator");
              }
            }
}
      YY_BREAK
case 31:
YY_RULE_SETUP
#line 525 "filt.l"
{
                if( _FiltLexArgCheck(regname, narg) == 0 ){
              /* new expression without an expression separator ... sigh */
              _FiltLexRegionEnd();
              _FiltLexNew();
              BEGIN INITIAL;
              yyless(0);
                } else {
                  narg++;
                  /* process this pure number in the current coord system */
                  _FiltLexNum(_FiltLexLcx());
                }
}
      YY_BREAK
case 32:
YY_RULE_SETUP
#line 538 "filt.l"
{
            /* new expression without an expression separator ... sigh */
            _FiltLexRegionEnd();
            _FiltLexNew();
            BEGIN INITIAL;
            yyless(0);
}
      YY_BREAK
case 33:
YY_RULE_SETUP
#line 545 "filt.l"
{
            /* explicit rule avoids the _FiltLexNew of general rule */
            ;
}
      YY_BREAK
case 34:
YY_RULE_SETUP
#line 549 "filt.l"
{ 
            nsparen++;
}
      YY_BREAK
case 35:
YY_RULE_SETUP
#line 552 "filt.l"
{
            if( nsparen ){
              nsparen--;
              _FiltLexRegionEnd();
              BEGIN INITIAL;
            } else {
              _FiltLexRegionEnd();
              BEGIN INITIAL;
              /* REJECT; */
              /* explicit execution of general rule instead of REJECT */
              nparen--;
              _FiltLexNew();
              _FiltLexCat(yytext);
              _FiltLexNew();
            }
}
      YY_BREAK
case 36:
YY_RULE_SETUP
#line 568 "filt.l"
{ 
            _FiltLexRegionEnd();
            _FiltLexOp(yytext);
            BEGIN INITIAL;
}
      YY_BREAK
case 37:
YY_RULE_SETUP
#line 573 "filt.l"
{ 
            _FiltLexRegionEnd();
            _FiltLexNew();
            BEGIN INITIAL;
}
      YY_BREAK
case 38:
YY_RULE_SETUP
#line 579 "filt.l"
{
            if( YY_START == REG ){
              _FiltLexRegionEnd();
            }
            _FiltLexParen("(");
            BEGIN RLIST;
            narg = 0;
            _FiltLexTypeSet(TOK_RLIST);
            nrange = 0;
            if( !(rangename=FilterSymbolEnter(filt, yytext)) )
              _filterror("missing column or header parameter");
}
      YY_BREAK
case 39:
YY_RULE_SETUP
#line 591 "filt.l"
{ _FiltLexRangeAdd(rangename, yytext, 3, nrange++); }
      YY_BREAK
case 40:
YY_RULE_SETUP
#line 592 "filt.l"
{ _FiltLexRangeAdd(rangename, yytext, 1, nrange++); }
      YY_BREAK
case 41:
YY_RULE_SETUP
#line 593 "filt.l"
{ _FiltLexRangeAdd(rangename, yytext, 4, nrange++); }
      YY_BREAK
case 42:
YY_RULE_SETUP
#line 594 "filt.l"
{ _FiltLexRangeAdd(rangename, yytext, 2, nrange++); }
      YY_BREAK
case 43:
YY_RULE_SETUP
#line 595 "filt.l"
{ ; }
      YY_BREAK
case 44:
YY_RULE_SETUP
#line 596 "filt.l"
{ ; }
      YY_BREAK
case 45:
YY_RULE_SETUP
#line 597 "filt.l"
{ ; }
      YY_BREAK
case 46:
YY_RULE_SETUP
#line 598 "filt.l"
{
            _FiltLexParen(")");
            BEGIN INITIAL;
}
      YY_BREAK
case 47:
YY_RULE_SETUP
#line 602 "filt.l"
{
            _FiltLexParen(")");
            _FiltLexOp(yytext);
            BEGIN INITIAL;
}           
      YY_BREAK
case 48:
YY_RULE_SETUP
#line 607 "filt.l"
{ 
            _FiltLexParen(")");
            BEGIN INITIAL;
}
      YY_BREAK
case 49:
*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
yy_c_buf_p = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
#line 612 "filt.l"
{ 
            /* Found a routine */
            laststart = YY_START;
            BEGIN RTINE;
            narg = 0;
            nrparen = 0;
            _FiltLexTypeSet(TOK_RTINE);
            _FiltLexCat(FilterLexRoutine1(filt, yytext));
            nroutine++;
}
      YY_BREAK
case 50:
YY_RULE_SETUP
#line 622 "filt.l"
{
            /* explicit rule avoids the _FiltLexNew of general rule */
            _FiltLexCat(",");
}
      YY_BREAK
case 51:
YY_RULE_SETUP
#line 626 "filt.l"
{
            nrparen++;
            _FiltLexCat("(");
}
      YY_BREAK
case 52:
YY_RULE_SETUP
#line 630 "filt.l"
{
            nrparen--;
            if( nrparen ){
              _FiltLexCat(")");
            }
            else{
              /* end of routine */
              BEGIN laststart;
              _FiltLexCat(FilterLexRoutine2(filt, ")"));
            }
}
      YY_BREAK
case 53:
YY_RULE_SETUP
#line 642 "filt.l"
{
            /* Found an include file */
            char *s, *t;
            if( YY_START == REG ){
              _FiltLexRegionEnd();
              _FiltLexNew();
            }
                /* handle FITS mask file specially */
                filt->nmask = _FiltFitsMask(yytext+1,
                                            &(filt->masks),
                                            &(filt->maskhd),
                                            &(filt->nmaskreg));
                /* filt->nmask == -1 => its not a FITS file */
                if( filt->nmask != -1 ){
                  switch(filt->nmask){
                  case -2:
                    _filterror("FITS image mask must be image data -");
                    break;
                  case -3:
                    _filterror("Invalid dimensions for FITS image mask -");
                    break;
                  case -4:
                    _filterror("FITS image mask cannot contain negative values -");
                    break;
                  default:
                    if( (filt->type != TYPE_IMAGE) && !filt->evsect ){
                      _filterror("FITS image mask is valid for image filtering only -");
                    }
                    else{
                      if( nmask )
                        _filterror("only one FITS image mask allowed at a time -");
                      else
                        nmask++;
                    }
                    break;
                  }
                }
                else{
              if ( include_stack_ptr >= MAX_INCLUDE_DEPTH ) {
                _filterror("include files are nested too deeply");
              }
              if( (s = (char *)FileContents(yytext+1, 0, NULL)) == NULL ){
                _filterror("can't access include file");
              }
              /* ignore empty include file */
              else if( *s == '\0' ){
                ;
              }
              else {
                t = FilterClip(s);
                free(s);
                include_stack[include_stack_ptr++] = YY_CURRENT_BUFFER;
                _FiltLexParen("(");
                FiltScanString(t);
                free(t);
                  }
            }
}
      YY_BREAK
case 54:
YY_RULE_SETUP
#line 701 "filt.l"
{
            if( !(tstr=FilterSymbolEnter(filt, yytext)) )
              _filterror("missing column or header parameter");
            else{
              narg++;
              /* add if initial condition (not region, routine, etc.) */
              if( YY_START == INITIAL ) _FiltLexTypeSet(TOK_NAME);
              _FiltLexCat(FilterLexName(filt,tstr));
            }
}
      YY_BREAK
case 55:
YY_RULE_SETUP
#line 712 "filt.l"
{ ; /* ignore white space */ }
      YY_BREAK
case 56:
YY_RULE_SETUP
#line 714 "filt.l"
{ narg++; _FiltLexCat(yytext); }
      YY_BREAK
case 57:
YY_RULE_SETUP
#line 716 "filt.l"
{
                  unsigned long bits;
                  char tbuf[SZ_LINE];
                  char *s;
                  bits = strtoul(yytext+2, &s, 2);
                  if( *s != '\0' )
                    _filterror("invalid binary value");
                  snprintf(tbuf, SZ_LINE, "0x%lx", bits);
                  narg++;
                  _FiltLexCat(tbuf);
                }
      YY_BREAK
case 58:
YY_RULE_SETUP
#line 728 "filt.l"
{ narg++; _FiltLexCat(yytext); }
      YY_BREAK
case 59:
YY_RULE_SETUP
#line 730 "filt.l"
{
            _FiltLexOp(yytext);
            if( YY_START != RTINE ) BEGIN INITIAL;
}
      YY_BREAK
case 60:
YY_RULE_SETUP
#line 735 "filt.l"
{
            nparen++;
            _FiltLexNew();
            _FiltLexCat(yytext);
            _FiltLexNew();
}
      YY_BREAK
case 61:
YY_RULE_SETUP
#line 741 "filt.l"
{
            nparen--;
            _FiltLexNew();
            _FiltLexCat(yytext);
            _FiltLexNew();
}
      YY_BREAK
case 62:
YY_RULE_SETUP
#line 747 "filt.l"
{       
            _FiltLexNew();
            BEGIN INITIAL;
}
      YY_BREAK
case 63:
YY_RULE_SETUP
#line 752 "filt.l"
{ _FiltLexCat(yytext); }
      YY_BREAK
case YY_STATE_EOF(INITIAL):
case YY_STATE_EOF(RLIST):
case YY_STATE_EOF(RTINE):
case YY_STATE_EOF(REG):
case YY_STATE_EOF(AREG):
case YY_STATE_EOF(INCLUDE):
case YY_STATE_EOF(COMM):
#line 754 "filt.l"
{
            if ( --include_stack_ptr < 0 ){
              _FiltLexMake();
              yy_delete_buffer( YY_CURRENT_BUFFER );
                  yyterminate();
            } else {
              _FiltLexParen(")");
              yy_delete_buffer( YY_CURRENT_BUFFER );
              yy_switch_to_buffer(include_stack[include_stack_ptr] );
            }
}
      YY_BREAK
case 64:
YY_RULE_SETUP
#line 766 "filt.l"
ECHO;
      YY_BREAK
#line 4383 "lex.filt.c"

      case YY_END_OF_BUFFER:
            {
            /* Amount of text matched not including the EOB char. */
            int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;

            /* Undo the effects of YY_DO_BEFORE_ACTION. */
            *yy_cp = yy_hold_char;
            YY_RESTORE_YY_MORE_OFFSET

            if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
                  {
                  /* We're scanning a new file or input source.  It's
                   * possible that this happened because the user
                   * just pointed yyin at a new source and called
                   * yylex().  If so, then we have to assure
                   * consistency between yy_current_buffer and our
                   * globals.  Here is the right place to do so, because
                   * this is the first action (other than possibly a
                   * back-up) that will match for the new input source.
                   */
                  yy_n_chars = yy_current_buffer->yy_n_chars;
                  yy_current_buffer->yy_input_file = yyin;
                  yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
                  }

            /* Note that here we test for yy_c_buf_p "<=" to the position
             * of the first EOB in the buffer, since yy_c_buf_p will
             * already have been incremented past the NUL character
             * (since all states make transitions on EOB to the
             * end-of-buffer state).  Contrast this with the test
             * in input().
             */
            if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
                  { /* This was really a NUL. */
                  yy_state_type yy_next_state;

                  yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;

                  yy_current_state = yy_get_previous_state();

                  /* Okay, we're now positioned to make the NUL
                   * transition.  We couldn't have
                   * yy_get_previous_state() go ahead and do it
                   * for us because it doesn't know how to deal
                   * with the possibility of jamming (and we don't
                   * want to build jamming into it because then it
                   * will run more slowly).
                   */

                  yy_next_state = yy_try_NUL_trans( yy_current_state );

                  yy_bp = yytext_ptr + YY_MORE_ADJ;

                  if ( yy_next_state )
                        {
                        /* Consume the NUL. */
                        yy_cp = ++yy_c_buf_p;
                        yy_current_state = yy_next_state;
                        goto yy_match;
                        }

                  else
                        {
                        yy_cp = yy_c_buf_p;
                        goto yy_find_action;
                        }
                  }

            else switch ( yy_get_next_buffer() )
                  {
                  case EOB_ACT_END_OF_FILE:
                        {
                        yy_did_buffer_switch_on_eof = 0;

                        if ( yywrap() )
                              {
                              /* Note: because we've taken care in
                               * yy_get_next_buffer() to have set up
                               * yytext, we can now set up
                               * yy_c_buf_p so that if some total
                               * hoser (like flex itself) wants to
                               * call the scanner after we return the
                               * YY_NULL, it'll still work - another
                               * YY_NULL will get returned.
                               */
                              yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;

                              yy_act = YY_STATE_EOF(YY_START);
                              goto do_action;
                              }

                        else
                              {
                              if ( ! yy_did_buffer_switch_on_eof )
                                    YY_NEW_FILE;
                              }
                        break;
                        }

                  case EOB_ACT_CONTINUE_SCAN:
                        yy_c_buf_p =
                              yytext_ptr + yy_amount_of_matched_text;

                        yy_current_state = yy_get_previous_state();

                        yy_cp = yy_c_buf_p;
                        yy_bp = yytext_ptr + YY_MORE_ADJ;
                        goto yy_match;

                  case EOB_ACT_LAST_MATCH:
                        yy_c_buf_p =
                        &yy_current_buffer->yy_ch_buf[yy_n_chars];

                        yy_current_state = yy_get_previous_state();

                        yy_cp = yy_c_buf_p;
                        yy_bp = yytext_ptr + YY_MORE_ADJ;
                        goto yy_find_action;
                  }
            break;
            }

      default:
            YY_FATAL_ERROR(
                  "fatal flex scanner internal error--no action found" );
      } /* end of action switch */
            } /* end of scanning one token */
      } /* end of yylex */


/* yy_get_next_buffer - try to read in a new buffer
 *
 * Returns a code representing an action:
 *    EOB_ACT_LAST_MATCH -
 *    EOB_ACT_CONTINUE_SCAN - continue scanning from current position
 *    EOB_ACT_END_OF_FILE - end of file
 */

static int yy_get_next_buffer()
      {
      register char *dest = yy_current_buffer->yy_ch_buf;
      register char *source = yytext_ptr;
      register int number_to_move, i;
      int ret_val;

      if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
            YY_FATAL_ERROR(
            "fatal flex scanner internal error--end of buffer missed" );

      if ( yy_current_buffer->yy_fill_buffer == 0 )
            { /* Don't try to fill the buffer, so this is an EOF. */
            if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
                  {
                  /* We matched a single character, the EOB, so
                   * treat this as a final EOF.
                   */
                  return EOB_ACT_END_OF_FILE;
                  }

            else
                  {
                  /* We matched some text prior to the EOB, first
                   * process it.
                   */
                  return EOB_ACT_LAST_MATCH;
                  }
            }

      /* Try to read more data. */

      /* First move last chars to start of buffer. */
      number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;

      for ( i = 0; i < number_to_move; ++i )
            *(dest++) = *(source++);

      if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
            /* don't do the read, it's not guaranteed to return an EOF,
             * just force an EOF
             */
            yy_current_buffer->yy_n_chars = yy_n_chars = 0;

      else
            {
            int num_to_read =
                  yy_current_buffer->yy_buf_size - number_to_move - 1;

            while ( num_to_read <= 0 )
                  { /* Not enough room in the buffer - grow it. */
#ifdef YY_USES_REJECT
                  YY_FATAL_ERROR(
"input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
#else

                  /* just a shorter name for the current buffer */
                  YY_BUFFER_STATE b = yy_current_buffer;

                  int yy_c_buf_p_offset =
                        (int) (yy_c_buf_p - b->yy_ch_buf);

                  if ( b->yy_is_our_buffer )
                        {
                        int new_size = b->yy_buf_size * 2;

                        if ( new_size <= 0 )
                              b->yy_buf_size += b->yy_buf_size / 8;
                        else
                              b->yy_buf_size *= 2;

                        b->yy_ch_buf = (char *)
                              /* Include room in for 2 EOB chars. */
                              yy_flex_realloc( (void *) b->yy_ch_buf,
                                           b->yy_buf_size + 2 );
                        }
                  else
                        /* Can't grow it, we don't own it. */
                        b->yy_ch_buf = 0;

                  if ( ! b->yy_ch_buf )
                        YY_FATAL_ERROR(
                        "fatal error - scanner input buffer overflow" );

                  yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];

                  num_to_read = yy_current_buffer->yy_buf_size -
                                    number_to_move - 1;
#endif
                  }

            if ( num_to_read > YY_READ_BUF_SIZE )
                  num_to_read = YY_READ_BUF_SIZE;

            /* Read in more data. */
            YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
                  yy_n_chars, num_to_read );

            yy_current_buffer->yy_n_chars = yy_n_chars;
            }

      if ( yy_n_chars == 0 )
            {
            if ( number_to_move == YY_MORE_ADJ )
                  {
                  ret_val = EOB_ACT_END_OF_FILE;
                  yyrestart( yyin );
                  }

            else
                  {
                  ret_val = EOB_ACT_LAST_MATCH;
                  yy_current_buffer->yy_buffer_status =
                        YY_BUFFER_EOF_PENDING;
                  }
            }

      else
            ret_val = EOB_ACT_CONTINUE_SCAN;

      yy_n_chars += number_to_move;
      yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
      yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;

      yytext_ptr = &yy_current_buffer->yy_ch_buf[0];

      return ret_val;
      }


/* yy_get_previous_state - get the state just before the EOB char was reached */

static yy_state_type yy_get_previous_state()
      {
      register yy_state_type yy_current_state;
      register char *yy_cp;

      yy_current_state = yy_start;
      yy_state_ptr = yy_state_buf;
      *yy_state_ptr++ = yy_current_state;

      for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
            {
            register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
            while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
                  {
                  yy_current_state = (int) yy_def[yy_current_state];
                  if ( yy_current_state >= 1504 )
                        yy_c = yy_meta[(unsigned int) yy_c];
                  }
            yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
            *yy_state_ptr++ = yy_current_state;
            }

      return yy_current_state;
      }


/* yy_try_NUL_trans - try to make a transition on the NUL character
 *
 * synopsis
 *    next_state = yy_try_NUL_trans( current_state );
 */

#ifdef YY_USE_PROTOS
static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
#else
static yy_state_type yy_try_NUL_trans( yy_current_state )
yy_state_type yy_current_state;
#endif
      {
      register int yy_is_jam;

      register YY_CHAR yy_c = 1;
      while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
            {
            yy_current_state = (int) yy_def[yy_current_state];
            if ( yy_current_state >= 1504 )
                  yy_c = yy_meta[(unsigned int) yy_c];
            }
      yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
      yy_is_jam = (yy_current_state == 1503);
      if ( ! yy_is_jam )
            *yy_state_ptr++ = yy_current_state;

      return yy_is_jam ? 0 : yy_current_state;
      }


#ifndef YY_NO_UNPUT
#ifdef YY_USE_PROTOS
static void yyunput( int c, register char *yy_bp )
#else
static void yyunput( c, yy_bp )
int c;
register char *yy_bp;
#endif
      {
      register char *yy_cp = yy_c_buf_p;

      /* undo effects of setting up yytext */
      *yy_cp = yy_hold_char;

      if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
            { /* need to shift things up to make room */
            /* +2 for EOB chars. */
            register int number_to_move = yy_n_chars + 2;
            register char *dest = &yy_current_buffer->yy_ch_buf[
                              yy_current_buffer->yy_buf_size + 2];
            register char *source =
                        &yy_current_buffer->yy_ch_buf[number_to_move];

            while ( source > yy_current_buffer->yy_ch_buf )
                  *--dest = *--source;

            yy_cp += (int) (dest - source);
            yy_bp += (int) (dest - source);
            yy_current_buffer->yy_n_chars =
                  yy_n_chars = yy_current_buffer->yy_buf_size;

            if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
                  YY_FATAL_ERROR( "flex scanner push-back overflow" );
            }

      *--yy_cp = (char) c;


      yytext_ptr = yy_bp;
      yy_hold_char = *yy_cp;
      yy_c_buf_p = yy_cp;
      }
#endif      /* ifndef YY_NO_UNPUT */


#ifdef __cplusplus
static int yyinput()
#else
static int input()
#endif
      {
      int c;

      *yy_c_buf_p = yy_hold_char;

      if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
            {
            /* yy_c_buf_p now points to the character we want to return.
             * If this occurs *before* the EOB characters, then it's a
             * valid NUL; if not, then we've hit the end of the buffer.
             */
            if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
                  /* This was really a NUL. */
                  *yy_c_buf_p = '\0';

            else
                  { /* need more input */
                  int offset = yy_c_buf_p - yytext_ptr;
                  ++yy_c_buf_p;

                  switch ( yy_get_next_buffer() )
                        {
                        case EOB_ACT_LAST_MATCH:
                              /* This happens because yy_g_n_b()
                               * sees that we've accumulated a
                               * token and flags that we need to
                               * try matching the token before
                               * proceeding.  But for input(),
                               * there's no matching to consider.
                               * So convert the EOB_ACT_LAST_MATCH
                               * to EOB_ACT_END_OF_FILE.
                               */

                              /* Reset buffer status. */
                              yyrestart( yyin );

                              /* fall through */

                        case EOB_ACT_END_OF_FILE:
                              {
                              if ( yywrap() )
                                    return EOF;

                              if ( ! yy_did_buffer_switch_on_eof )
                                    YY_NEW_FILE;
#ifdef __cplusplus
                              return yyinput();
#else
                              return input();
#endif
                              }

                        case EOB_ACT_CONTINUE_SCAN:
                              yy_c_buf_p = yytext_ptr + offset;
                              break;
                        }
                  }
            }

      c = *(unsigned char *) yy_c_buf_p;  /* cast for 8-bit char's */
      *yy_c_buf_p = '\0';     /* preserve yytext */
      yy_hold_char = *++yy_c_buf_p;


      return c;
      }


#ifdef YY_USE_PROTOS
void yyrestart( FILE *input_file )
#else
void yyrestart( input_file )
FILE *input_file;
#endif
      {
      if ( ! yy_current_buffer )
            yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );

      yy_init_buffer( yy_current_buffer, input_file );
      yy_load_buffer_state();
      }


#ifdef YY_USE_PROTOS
void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
#else
void yy_switch_to_buffer( new_buffer )
YY_BUFFER_STATE new_buffer;
#endif
      {
      if ( yy_current_buffer == new_buffer )
            return;

      if ( yy_current_buffer )
            {
            /* Flush out information for old buffer. */
            *yy_c_buf_p = yy_hold_char;
            yy_current_buffer->yy_buf_pos = yy_c_buf_p;
            yy_current_buffer->yy_n_chars = yy_n_chars;
            }

      yy_current_buffer = new_buffer;
      yy_load_buffer_state();

      /* We don't actually know whether we did this switch during
       * EOF (yywrap()) processing, but the only time this flag
       * is looked at is after yywrap() is called, so it's safe
       * to go ahead and always set it.
       */
      yy_did_buffer_switch_on_eof = 1;
      }


#ifdef YY_USE_PROTOS
void yy_load_buffer_state( void )
#else
void yy_load_buffer_state()
#endif
      {
      yy_n_chars = yy_current_buffer->yy_n_chars;
      yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
      yyin = yy_current_buffer->yy_input_file;
      yy_hold_char = *yy_c_buf_p;
      }


#ifdef YY_USE_PROTOS
YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
#else
YY_BUFFER_STATE yy_create_buffer( file, size )
FILE *file;
int size;
#endif
      {
      YY_BUFFER_STATE b;

      b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
      if ( ! b )
            YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );

      b->yy_buf_size = size;

      /* yy_ch_buf has to be 2 characters longer than the size given because
       * we need to put in 2 end-of-buffer characters.
       */
      b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
      if ( ! b->yy_ch_buf )
            YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );

      b->yy_is_our_buffer = 1;

      yy_init_buffer( b, file );

      return b;
      }


#ifdef YY_USE_PROTOS
void yy_delete_buffer( YY_BUFFER_STATE b )
#else
void yy_delete_buffer( b )
YY_BUFFER_STATE b;
#endif
      {
      if ( ! b )
            return;

      if ( b == yy_current_buffer )
            yy_current_buffer = (YY_BUFFER_STATE) 0;

      if ( b->yy_is_our_buffer )
            yy_flex_free( (void *) b->yy_ch_buf );

      yy_flex_free( (void *) b );
      }



#ifdef YY_USE_PROTOS
void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
#else
void yy_init_buffer( b, file )
YY_BUFFER_STATE b;
FILE *file;
#endif


      {
      yy_flush_buffer( b );

      b->yy_input_file = file;
      b->yy_fill_buffer = 1;

#if YY_ALWAYS_INTERACTIVE
      b->yy_is_interactive = 1;
#else
#if YY_NEVER_INTERACTIVE
      b->yy_is_interactive = 0;
#else
      b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
#endif
#endif
      }


#ifdef YY_USE_PROTOS
void yy_flush_buffer( YY_BUFFER_STATE b )
#else
void yy_flush_buffer( b )
YY_BUFFER_STATE b;
#endif

      {
      if ( ! b )
            return;

      b->yy_n_chars = 0;

      /* We always need two end-of-buffer characters.  The first causes
       * a transition to the end-of-buffer state.  The second causes
       * a jam in that state.
       */
      b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
      b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;

      b->yy_buf_pos = &b->yy_ch_buf[0];

      b->yy_at_bol = 1;
      b->yy_buffer_status = YY_BUFFER_NEW;

      if ( b == yy_current_buffer )
            yy_load_buffer_state();
      }


#ifndef YY_NO_SCAN_BUFFER
#ifdef YY_USE_PROTOS
YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
#else
YY_BUFFER_STATE yy_scan_buffer( base, size )
char *base;
yy_size_t size;
#endif
      {
      YY_BUFFER_STATE b;

      if ( size < 2 ||
           base[size-2] != YY_END_OF_BUFFER_CHAR ||
           base[size-1] != YY_END_OF_BUFFER_CHAR )
            /* They forgot to leave room for the EOB's. */
            return 0;

      b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
      if ( ! b )
            YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );

      b->yy_buf_size = size - 2;    /* "- 2" to take care of EOB's */
      b->yy_buf_pos = b->yy_ch_buf = base;
      b->yy_is_our_buffer = 0;
      b->yy_input_file = 0;
      b->yy_n_chars = b->yy_buf_size;
      b->yy_is_interactive = 0;
      b->yy_at_bol = 1;
      b->yy_fill_buffer = 0;
      b->yy_buffer_status = YY_BUFFER_NEW;

      yy_switch_to_buffer( b );

      return b;
      }
#endif


#ifndef YY_NO_SCAN_STRING
#ifdef YY_USE_PROTOS
YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
#else
YY_BUFFER_STATE yy_scan_string( yy_str )
yyconst char *yy_str;
#endif
      {
      int len;
      for ( len = 0; yy_str[len]; ++len )
            ;

      return yy_scan_bytes( yy_str, len );
      }
#endif


#ifndef YY_NO_SCAN_BYTES
#ifdef YY_USE_PROTOS
YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
#else
YY_BUFFER_STATE yy_scan_bytes( bytes, len )
yyconst char *bytes;
int len;
#endif
      {
      YY_BUFFER_STATE b;
      char *buf;
      yy_size_t n;
      int i;

      /* Get memory for full buffer, including space for trailing EOB's. */
      n = len + 2;
      buf = (char *) yy_flex_alloc( n );
      if ( ! buf )
            YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );

      for ( i = 0; i < len; ++i )
            buf[i] = bytes[i];

      buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;

      b = yy_scan_buffer( buf, n );
      if ( ! b )
            YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );

      /* It's okay to grow etc. this buffer, and we should throw it
       * away when we're done.
       */
      b->yy_is_our_buffer = 1;

      return b;
      }
#endif


#ifndef YY_NO_PUSH_STATE
#ifdef YY_USE_PROTOS
static void yy_push_state( int new_state )
#else
static void yy_push_state( new_state )
int new_state;
#endif
      {
      if ( yy_start_stack_ptr >= yy_start_stack_depth )
            {
            yy_size_t new_size;

            yy_start_stack_depth += YY_START_STACK_INCR;
            new_size = yy_start_stack_depth * sizeof( int );

            if ( ! yy_start_stack )
                  yy_start_stack = (int *) yy_flex_alloc( new_size );

            else
                  yy_start_stack = (int *) yy_flex_realloc(
                              (void *) yy_start_stack, new_size );

            if ( ! yy_start_stack )
                  YY_FATAL_ERROR(
                  "out of memory expanding start-condition stack" );
            }

      yy_start_stack[yy_start_stack_ptr++] = YY_START;

      BEGIN(new_state);
      }
#endif


#ifndef YY_NO_POP_STATE
static void yy_pop_state()
      {
      if ( --yy_start_stack_ptr < 0 )
            YY_FATAL_ERROR( "start-condition stack underflow" );

      BEGIN(yy_start_stack[yy_start_stack_ptr]);
      }
#endif


#ifndef YY_NO_TOP_STATE
static int yy_top_state()
      {
      return yy_start_stack[yy_start_stack_ptr - 1];
      }
#endif

#ifndef YY_EXIT_FAILURE
#define YY_EXIT_FAILURE 2
#endif

#ifdef YY_USE_PROTOS
static void yy_fatal_error( yyconst char msg[] )
#else
static void yy_fatal_error( msg )
char msg[];
#endif
      {
      (void) fprintf( stderr, "%s\n", msg );
      exit( YY_EXIT_FAILURE );
      }



/* Redefine yyless() so it works in section 3 code. */

#undef yyless
#define yyless(n) \
      do \
            { \
            /* Undo effects of setting up yytext. */ \
            yytext[yyleng] = yy_hold_char; \
            yy_c_buf_p = yytext + n; \
            yy_hold_char = *yy_c_buf_p; \
            *yy_c_buf_p = '\0'; \
            yyleng = n; \
            } \
      while ( 0 )


/* Internal utility routines. */

#ifndef yytext_ptr
#ifdef YY_USE_PROTOS
static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
#else
static void yy_flex_strncpy( s1, s2, n )
char *s1;
yyconst char *s2;
int n;
#endif
      {
      register int i;
      for ( i = 0; i < n; ++i )
            s1[i] = s2[i];
      }
#endif

#ifdef YY_NEED_STRLEN
#ifdef YY_USE_PROTOS
static int yy_flex_strlen( yyconst char *s )
#else
static int yy_flex_strlen( s )
yyconst char *s;
#endif
      {
      register int n;
      for ( n = 0; s[n]; ++n )
            ;

      return n;
      }
#endif


#ifdef YY_USE_PROTOS
static void *yy_flex_alloc( yy_size_t size )
#else
static void *yy_flex_alloc( size )
yy_size_t size;
#endif
      {
      return (void *) malloc( size );
      }

#ifdef YY_USE_PROTOS
static void *yy_flex_realloc( void *ptr, yy_size_t size )
#else
static void *yy_flex_realloc( ptr, size )
void *ptr;
yy_size_t size;
#endif
      {
      /* The cast to (char *) in the following accommodates both
       * implementations that use char* generic pointers, and those
       * that use void* generic pointers.  It works with the latter
       * because both ANSI C and C++ allow castless assignment from
       * any pointer type to void*, and deal with argument conversions
       * as though doing an assignment.
       */
      return (void *) realloc( (char *) ptr, size );
      }

#ifdef YY_USE_PROTOS
static void yy_flex_free( void *ptr )
#else
static void yy_flex_free( ptr )
void *ptr;
#endif
      {
      free( ptr );
      }

#if YY_MAIN
int main()
      {
      yylex();
      return 0;
      }
#endif
#line 766 "filt.l"


/*
 *
 * Private Routines 
 *
 *
 */

/*
 *
 * _FiltLexNew -- finish last start and set up new filter segment
 *
 */
#ifdef YY_USE_PROTOS
static void
_FiltLexNew(void)
#else
static void _FiltLexNew()
#endif
{
  int i;
  int last;
  
  if( nfiltseg >= maxfiltseg ){
    last = maxfiltseg;
    if( maxfiltseg == 0 ){
      maxfiltseg = SEGINC;
      filtseg = (FiltSeg *)malloc(maxfiltseg * sizeof(FiltSeg));
    }
    else{
      maxfiltseg += SEGINC;
      filtseg = (FiltSeg *)realloc(filtseg, maxfiltseg * sizeof(FiltSeg));
    }
    /* clear the unused records */ 
    for(i=last; i<maxfiltseg; i++){
      filtseg[i] = NULL;
    }
  }
  if( !nfiltseg || (filtseg[nfiltseg-1] && filtseg[nfiltseg-1]->s) ){
    filtseg[nfiltseg] = (FiltSeg)calloc(1, sizeof(FiltSegRec));
    nfiltseg++;
  }
  filtseg[nfiltseg-1]->n = nfiltseg-1;
  filtseg[nfiltseg-1]->nregion = 0;
}

/*
 *
 * _FiltLexParen -- add a paren to the filter string buffer
 *
 */
#ifdef YY_USE_PROTOS
static void
_FiltLexParen(char *str)
#else
static void _FiltLexParen(str)
     char *str;
#endif
{
  _FiltLexNew();
  _FiltLexCat(str);
  _FiltLexNew();
}

/*
 *
 * __FiltLexCat -- add a string to the filter string buffer
 *
 */
#ifdef YY_USE_PROTOS
static void
__FiltLexCat(char *str, char **ostr, int *olen)
#else
static void __FiltLexCat(str, ostr, olen)
     char *str;
     char **ostr;
     int *olen;
#endif
{
  int blen;
  int slen;
  
  if( (str == NULL) || (*str == '\0') )
    return;
  else
    slen = strlen(str) + 1;
  
  if( (*ostr == NULL) || (**ostr == '\0') )
    blen = 0;
  else
    blen = strlen(*ostr);
  
  while( (blen + slen) >= *olen ){
    *olen += SEGINC;
  }
  if( blen == 0 )
    *ostr = (char *)calloc(*olen, sizeof(char));
  else
    *ostr = (char *)realloc(*ostr, *olen);
  strcat(*ostr, str);
}

/*
 *
 * _FiltLexCat -- add a string to the filter string buffer
 *
 */
#ifdef YY_USE_PROTOS
static void
_FiltLexCat(char *str)
#else
static void _FiltLexCat(str)
     char *str;
#endif
{
  char *s;
  if( !str || !*str )
    return;
  if( nfiltseg ==0 )
    _FiltLexNew();
  s = malloc(strlen(str)+1);
  nowhite(str, s);
  __FiltLexCat(s, &(filtseg[nfiltseg-1]->s), &(filtseg[nfiltseg-1]->len));
  if( s ) free(s);
}

/*
 *
 * _FiltLexArgSave -- save a radius or angle value to the temp string:
 * this is a special hack for funcnts
 *
 */
#ifdef YY_USE_PROTOS
static void
_FiltLexArgSave(double dval)
#else
static void _FiltLexArgSave(dval)
        double dval;
#endif
{
  char tbuf[SZ_LINE];

  if( narg < 3 )
    return;
  snprintf(tbuf, SZ_LINE, DFMT1, dval);
  if( narg == 3 ){ 
    *lastarg = '\0';
    lastd1 = 0.0;
    lastd2 = 0.0;
    if( filtseg[nfiltseg-1]->radang ){
      free(filtseg[nfiltseg-1]->radang);
      filtseg[nfiltseg-1]->radang = NULL;
      filtseg[nfiltseg-1]->ralen = 0;
    }
  }
  switch(regid){
  case TY_ANNULUS:
  case TY_CIRCLE:
    if( *lastarg ){
      __FiltLexCat(lastarg, &(filtseg[nfiltseg-1]->radang),
                         &(filtseg[nfiltseg-1]->ralen));
    }
    __FiltLexCat(tbuf, &(filtseg[nfiltseg-1]->radang),
                       &(filtseg[nfiltseg-1]->ralen));
    if( narg > 3 ){
      __FiltLexCat(",NA,NA\n", &(filtseg[nfiltseg-1]->radang),
                               &(filtseg[nfiltseg-1]->ralen));
      strcpy(lastarg, tbuf);
    }
    lastd1 = lastd2;
    lastd2 = dval;
    break;

  case TY_BOX:
  case TY_ELLIPSE:
    if( (narg%2) == 1 ){
      if( *lastarg ){
        __FiltLexCat(lastarg, &(filtseg[nfiltseg-1]->radang),
                              &(filtseg[nfiltseg-1]->ralen));
      }
      __FiltLexCat(tbuf, &(filtseg[nfiltseg-1]->radang),
                         &(filtseg[nfiltseg-1]->ralen));
      if( narg > 3 ){
        __FiltLexCat(",NA,NA\n", &(filtseg[nfiltseg-1]->radang),
                                 &(filtseg[nfiltseg-1]->ralen));
        strcpy(lastarg, tbuf);
      }
      lastd1 = lastd2;
      lastd2 = dval;
    }
    break;

  case TY_PIE:
    if( narg == 3 ){
      __FiltLexCat("NA,NA", &(filtseg[nfiltseg-1]->radang),
                            &(filtseg[nfiltseg-1]->ralen));
    }
    else if( *lastarg ){
      __FiltLexCat("NA,NA,", &(filtseg[nfiltseg-1]->radang),
                             &(filtseg[nfiltseg-1]->ralen));
      __FiltLexCat(lastarg, &(filtseg[nfiltseg-1]->radang),
                            &(filtseg[nfiltseg-1]->ralen));
    }
    __FiltLexCat(tbuf, &(filtseg[nfiltseg-1]->radang),
                       &(filtseg[nfiltseg-1]->ralen));
    if( narg > 3 ){
      __FiltLexCat("\n", &(filtseg[nfiltseg-1]->radang),
                         &(filtseg[nfiltseg-1]->ralen));
      strcpy(lastarg, tbuf);
    }
    lastd1 = lastd2;
    lastd2 = dval;
    break;

  case TY_POINT:
    /* we have to process this here if its is a varargs */
    /* so, for the 3rd arg, we add a line for initial x, y pair */
    if( narg == 3 ){ 
      __FiltLexCat("NA,NA,NA,NA\n", &(filtseg[nfiltseg-1]->radang),
                                    &(filtseg[nfiltseg-1]->ralen));
    }
    /* and for every even arg, add a line for the preceeding x,y pair */
    else if( (narg % 2) == 0 ){ 
      __FiltLexCat("NA,NA,NA,NA\n", &(filtseg[nfiltseg-1]->radang),
                                    &(filtseg[nfiltseg-1]->ralen));
    }
    break;
  default:
    return;
  }      
}

/*
 *
 * _FiltLexAccel -- appply acceleration to a segment
 *
 */
#ifdef YY_USE_PROTOS
static int
_FiltLexAccel(int n)
#else
static int _FiltLexAccel(n)
     int n;
#endif
{
  int i;
  char tbuf[SZ_LINE];
  char *s;
  double dinc;

  /* check region type */
  switch(regid){
    case TY_ANNULUS:
      break;
    case TY_BOX:
      narg -= 2;
      break;
    case TY_CIRCLE:
      narg -= 1;
      break;
    case TY_ELLIPSE:
      narg -= 2;
      break;
    case TY_PIE:
      break;
    default:
      _filterror("annulus, box, circle, ellipse, pie accelerators only - ");
      break;
  }
  /* add the argument */
  snprintf(tbuf, SZ_LINE, IFMT1, n);
  _FiltLexCat(tbuf);
  /* change the name of the routine we will call */
  if( filtseg[nfiltseg-1]->s0 ){
    if( (s = strdup(&filtseg[nfiltseg-1]->s[filtseg[nfiltseg-1]->s0])) ){
      filtseg[nfiltseg-1]->s[filtseg[nfiltseg-1]->s0] = '\0';
      _FiltLexCat("n");
      _FiltLexCat(s);
      snprintf(tbuf, SZ_LINE, "%d ", n);
      __FiltLexCat(tbuf, &(filtseg[nfiltseg-1]->regions),
                     &(filtseg[nfiltseg-1]->nr));
      __FiltLexCat(tbuf, &(filtseg[nfiltseg-1]->shapes),
                     &(filtseg[nfiltseg-1]->ns));
      setargs = 1;
      free (s);
    }
    if( filtseg[nfiltseg-1]->radang ){
      free(filtseg[nfiltseg-1]->radang);
      filtseg[nfiltseg-1]->radang = NULL;
      filtseg[nfiltseg-1]->ralen = 0;
    }
    switch(regid){
      case TY_ANNULUS:
      case TY_BOX:
      case TY_CIRCLE:
      case TY_ELLIPSE:
        dinc = (lastd2 - lastd1)/n;
        for(i=1; i<=n; i++){
          snprintf(tbuf, SZ_LINE, DFMT2, lastd1+((i-1)*dinc), lastd1+(i*dinc));
          __FiltLexCat(tbuf, &(filtseg[nfiltseg-1]->radang),
                             &(filtseg[nfiltseg-1]->ralen));
          __FiltLexCat(",NA,NA", &(filtseg[nfiltseg-1]->radang),
                                 &(filtseg[nfiltseg-1]->ralen));
          if( i != n )
            __FiltLexCat("\n", &(filtseg[nfiltseg-1]->radang),
                               &(filtseg[nfiltseg-1]->ralen));
        }
        break;
      case TY_PIE:
        dinc = (lastd2 - lastd1)/n;
        for(i=1; i<=n; i++){
          snprintf(tbuf, SZ_LINE, DFMT2, lastd1+((i-1)*dinc), lastd1+(i*dinc));
          __FiltLexCat("NA,NA", &(filtseg[nfiltseg-1]->radang),
                                &(filtseg[nfiltseg-1]->ralen));
          __FiltLexCat(tbuf, &(filtseg[nfiltseg-1]->radang),
                             &(filtseg[nfiltseg-1]->ralen));
          if( i != n )
            __FiltLexCat("\n", &(filtseg[nfiltseg-1]->radang),
                               &(filtseg[nfiltseg-1]->ralen));
        }
        break;
      default:
        _filterror("annulus, box, circle, ellipse, pie accelerators only - ");
        break;
    }
    _FiltLexTypeSet(TOK_ACCEL);
  }
  else{
    _filterror("misplaced accelerator");
  }
  return(n);
}

/*
 *
 * _FiltLexTypeSet -- add type info to the filter segment record
 *
 */
#ifdef YY_USE_PROTOS
static void
_FiltLexTypeSet(int type)
#else
static void _FiltLexTypeSet(type)
     int type;
#endif
{
  if( nfiltseg ==0 )
    _FiltLexNew();
  filtseg[nfiltseg-1]->type |= type;
}

/*
 *
 * _FiltLexOp -- add an operator to the filter segment record
 *
 */
#ifdef YY_USE_PROTOS
static void
_FiltLexOp(char *op)
#else
static void _FiltLexOp(op)
     char *op;
#endif
{
  _FiltLexCat(op);
  filtseg[nfiltseg-1]->ops += 1;
}

#ifdef YY_USE_PROTOS
static void
_FiltLexRegionStart(int docols)
#else
static void _FiltLexRegionStart(docols)
      int docols;
#endif
{
  char *s, *t;
  char tbuf[SZ_LINE];

  narg = 0;
  setargs=0;
  s = malloc(strlen(yytext)+1);
  nowhite(yytext, s);
  if( *s == '+' ){
    regtype = TOK_IREG;
    strcpy(regname, s+1);
  }
  else if( *s == '-' ){
    regtype = TOK_EREG;
    strcpy(regname, s+1);
  }
  else if( *s == '!' ){
    regtype = TOK_NREG;
    strcpy(regname, s+1);
  }
  else{
    regtype = TOK_IREG;
    strcpy(regname, s);
  }
  _FiltLexTypeSet(regtype);
  if( !(t=strchr(regname, '(')) ){
    nsparen=0;
  }
  /* remove the paren from the regname string -- we will explicitly add it */
  else{
    *t = '\0';
    nsparen=1;
  }  
  /* convert to lower case, remove white space */
  culc(regname);
  nowhite(regname, s);
  strcpy(regname, s);
  /* convert abbrev to region */
  if( !strncmp(regname, "ann", 3) ){
    strcpy(regname, "annulus");
    regid = TY_ANNULUS;
  }
  else if( !strncmp(regname, "box", 3) ){
    strcpy(regname, "box");
    regid = TY_BOX;
  }
  else if( !strncmp(regname, "cir", 3) ){
    strcpy(regname, "circle");
    regid = TY_CIRCLE;
  }
  else if( !strncmp(regname, "ell", 3) ){
    strcpy(regname, "ellipse");
    regid = TY_ELLIPSE;
  }
  else if( !strncmp(regname, "fie", 3) ){
    strcpy(regname, "field");
    regid = TY_FIELD;
  }
  else if( !strncmp(regname, "lin", 3) ){
    strcpy(regname, "line");
    regid = TY_LINE;
  }
  else if( !strncmp(regname, "pan", 3) ){
    strcpy(regname, "panda");
    regid = TY_PANDA;
  }
  else if( !strncmp(regname, "bpa", 3) ){
    strcpy(regname, "bpanda");
    regid = TY_BPANDA;
  }
  else if( !strncmp(regname, "cpa", 3) ){
    strcpy(regname, "cpanda");
    regid = TY_CPANDA;
  }
  else if( !strncmp(regname, "epa", 3) ){
    strcpy(regname, "epanda");
    regid = TY_EPANDA;
  }
  else if( !strncmp(regname, "pie", 3) ){
    strcpy(regname, "pie");
    regid = TY_PIE;
  }
  else if( !strncmp(regname, "qtp", 3) ){
    strcpy(regname, "qtpie");
    regid = TY_PIE;
  }
  else if( !strncmp(regname, "poi", 3) ){
    strcpy(regname, "point");
    regid = TY_POINT;
  }
  else if( !strncmp(regname, "pol", 3) ){
    strcpy(regname, "polygon");
    regid = TY_POLYGON;
  }
  else if( !strcmp(regname, "imagemask") ){
    regid = TY_IMAGEMASK;
  }
  /* append filter-type prefix */
  switch( filt->type ){
  case TYPE_EVENTS:
    /* normally, we filter rows analytically using evregions.o */
    if( !filt->evsect )
      _FiltLexCat("ev");
    /* if evsect=xxx is specified, we filter by image pixels */
    else
      _FiltLexCat("im");
    break;
  case TYPE_IMAGE:
    /* image are filtered by image pixels */
    _FiltLexCat("im");
    break;
  }
  /* save size of current string so we can get back to the region string */
  filtseg[nfiltseg-1]->s0 = strlen(filtseg[nfiltseg-1]->s);
  /* append region */
  _FiltLexCat(FilterLexRegion1(filt,regname));
  /* append standard args */
  _FiltLexCat("(g,$RS,");
  /* add include/exclude and whether we mark y lines for this region
     (we don't mark y on excludes as an optimization) */
  switch(regtype){
  case TOK_IREG:
    snprintf(tbuf, SZ_LINE, "1,%d", TOK_IREG);
    _FiltLexCat(tbuf);
    break;
  case TOK_NREG:
    snprintf(tbuf, SZ_LINE, "0,%d", TOK_NREG);
    _FiltLexCat(tbuf);
    break;
  case TOK_EREG:
    snprintf(tbuf, SZ_LINE, "0,%d", TOK_EREG);
    _FiltLexCat(tbuf);
    break;
  }
  switch(docols){
  case 0:
    /* initialize default columns for tables -- but don't enter symbols yet */
    FilterSymbolDefaults(filt, 0);
    /* initialize wcs for default image case */
    _FiltLexWcsCols(filt->fhd, filt->xbin, filt->ybin);
    _FiltLexCat(",(double)x,(double)y");
    break;
  case 1:
    if( !initbindefs ){
      /* initialize default columns for tables and enter symbols */
      FilterSymbolDefaults(filt, 1);
      /* initialize wcs for default table case */
      _FiltLexWcsCols(filt->fhd, filt->xbin, filt->ybin);
      initbindefs++;
    }
    if( !filt->xbin || !filt->ybin )
      _filterror("no default columns defined for region");
    _FiltLexCat(",(double)");
    _FiltLexCat(filt->xbin);
    _FiltLexCat(",(double)");
    _FiltLexCat(filt->ybin);
    break;
  case 2:
    _FiltLexCat(",(double)");
    _FiltLexCat(colnames[0]);
    _FiltLexCat(",(double)");
    _FiltLexCat(colnames[1]);
    break;
  }
  if( s ) free(s);
}

#ifdef YY_USE_PROTOS
static void
_FiltLexRegionEnd(void)
#else
static void
_FiltLexRegionEnd()
#endif
{
  int n;
  char *s;
  char ebuf[SZ_LINE];
  char tbuf[SZ_LINE];

  /* add final arguments as required */
  switch( regid ){
  case TY_BOX:
    if( (narg%2) == 0 ){
      _FiltLexCat(",0.0"); narg++;
    }
    else{
      /* if we saved an angle arg, we need to replace the last position arg */
      if( *saveang ){
        if( (s=strrchr(filtseg[nfiltseg-1]->s, ',')) ){
          *s = '\0';
          _FiltLexCat(saveang);
        }
      }
    }
    break;
  case TY_ELLIPSE:
    if( (narg%2) == 0 ){
      _FiltLexCat(",0.0"); narg++;
    }
    else{
      /* if we saved an angle arg, we need to replace the last position arg */
      if( *saveang ){
        if( (s=strrchr(filtseg[nfiltseg-1]->s, ',')) ){
          *s = '\0';
          _FiltLexCat(saveang);
        }
      }
    }
    break;
  case TY_BPANDA:
  case TY_EPANDA:
    if( (narg%2) == 0 ){
      _FiltLexCat(",0.0"); narg++;
    }
    /* drop through here to process panda */
  case TY_PANDA:
  case TY_CPANDA:
    _FiltLexRegionPanda();
    setargs = 1;
    break;
  default:
    break;
  }

  /* argument check */
  if( (n=_FiltLexArgCheck(regname, narg)) > 0 ){
    /* don't bother printing where we are in region */
    *yytext = '\0';
    switch( vargs[n-1] ){
    case 'n':
      snprintf(ebuf, SZ_LINE, "'%s' requires %d args (%d found)", 
            rnames[n-1], rargs[n-1], narg);
      break;
    case 'e':
      snprintf(ebuf, SZ_LINE,
             "'%s' requires at least %d (even) args (%d found)", 
             rnames[n-1], rargs[n-1], narg);
      break;
    case 'o':
      snprintf(ebuf, SZ_LINE,
               "'%s' requires at least %d (odd) args (%d found)", 
             rnames[n-1], rargs[n-1], narg);
      break;
    case 'y':
    default:
      snprintf(ebuf, SZ_LINE, "'%s' requires %d args (%d found)", 
            rnames[n-1], rargs[n-1], narg);
      break;
    }
    _filterror(ebuf);
  }

  /* process varargs */
  if( (n < 0) || (regid == TY_POLYGON) ){
    if( filtseg[nfiltseg-1]->type & TOK_ACCEL ){
      _filterror("n= and variable arglist cannot be combined -");
    }
    /* if its a varargs, we need to end with PSTOP values */
    snprintf(sbuf, SZ_LINE, DFMT2, PSTOP, PSTOP);
    _FiltLexCat(sbuf);
    /* change the name of the routine we will call */
    if( regid != TY_POLYGON ){
      if( filtseg[nfiltseg-1]->s0 ){
        if( (s = strdup(&filtseg[nfiltseg-1]->s[filtseg[nfiltseg-1]->s0])) ){
          filtseg[nfiltseg-1]->s[filtseg[nfiltseg-1]->s0] = '\0';
          _FiltLexCat("v");
          _FiltLexCat(s);
          switch(regid){
          case TY_ANNULUS:
            n = narg - 3;
            break;
          case TY_BOX:
            n = (narg - 5)/2;
            break;
          case TY_CIRCLE:
            n = narg - 3;
            break;
          case TY_ELLIPSE:
            n = (narg - 5)/2;
            break;
          case TY_PIE:
            n = narg - 3;
            break;
          case TY_POINT:
            n = narg/2;
            break;
          default:
            _filterror("varargs: annulus, box, circle, ellipse, pie, point;");
            break;
          }
          snprintf(tbuf, SZ_LINE, "%d ", n);
          __FiltLexCat(tbuf, &(filtseg[nfiltseg-1]->regions),
                         &(filtseg[nfiltseg-1]->nr));
          __FiltLexCat(tbuf, &(filtseg[nfiltseg-1]->shapes),
                         &(filtseg[nfiltseg-1]->ns));
          setargs = 1;
          free (s);
        }
        _FiltLexTypeSet(TOK_VARARGS);
      }
      else{
        _filterror("invalid varargs");
      }
    }
  }


  /* set number of regions and shapes, if not already done */
  if( !setargs ){
    snprintf(tbuf, SZ_LINE, "%d ", 1);
    __FiltLexCat(tbuf, &(filtseg[nfiltseg-1]->regions),
                     &(filtseg[nfiltseg-1]->nr));
    __FiltLexCat(tbuf, &(filtseg[nfiltseg-1]->shapes),
                   &(filtseg[nfiltseg-1]->ns));
  }

  /* finish off region string */
  _FiltLexCat(FilterLexRegion2(filt,")"));

  /* no column arguments */
  colargs = 0;
  /* arguments are not set */
  setargs = 0;
  /* save angle not set */
  *saveang = 0;
}

#ifdef YY_USE_PROTOS
static int
_FiltLexRegionPanda(void)
#else
static int
_FiltLexRegionPanda()
#endif
{
  int i;
  int n=0;
  int got=0;
  int a, r;
  int ahi, rhi;

  int hi;
  double d[11];
  double ainc, rinc;
  char tbuf[SZ_LINE];
  char *s=NULL;
  char *t, *u;

  switch(regid){
  case TY_PANDA:
  case TY_CPANDA:
    hi = 7;
    break;
  case TY_BPANDA:
  case TY_EPANDA:
    hi = 10;
    break;
  default:
    _filterror("unknown panda type -- contact saord@cfa.harvard.edu");
    break;
  }
  s = NewString(filtseg[nfiltseg-1]->s);
  for(i=hi; i>=0; i--){
    /* look for last comma */
    t = strrchr(s, ',');
    if( !t ) goto done;
    /* null it out from base string */
    *t = '\0';
    /* point past comma and get double value */
    t++;
    d[i] = strtod(t, &u);
    if( t == u ) goto done;
  }

  switch(regid){
  case TY_PANDA:
  case TY_CPANDA:
    ainc = (d[3] - d[2])/d[4];
    ahi = (int)d[4];
    rinc = (d[6] - d[5])/d[7];
    rhi = (int)d[7];
    break;
  case TY_BPANDA:
  case TY_EPANDA:
    ainc = (d[3] - d[2])/d[4];
    ahi = (int)d[4];
    rinc = (d[7] - d[5])/d[9];
    rhi = (int)d[9];
    break;
  default:
    _filterror("unknown panda type -- contact saord@cfa.harvard.edu");
    break;
  }
  /* process limits arguments */
  for(a=1; a<=ahi; a++){
    for(r=1; r<=rhi; r++){
      snprintf(tbuf, SZ_LINE, DFMT4, 
               d[5]+((r-1)*rinc), d[5]+(r*rinc),
               d[2]+((a-1)*ainc), d[2]+(a*ainc));
      __FiltLexCat(tbuf, &(filtseg[nfiltseg-1]->radang),
                         &(filtseg[nfiltseg-1]->ralen));
      if( (a!=ahi) || (r!=rhi) )
        __FiltLexCat("\n", &(filtseg[nfiltseg-1]->radang),
                           &(filtseg[nfiltseg-1]->ralen));
      n++;
    }
  }

  /* adjust region and shape count */
  snprintf(tbuf, SZ_LINE, "%d ", n);
  __FiltLexCat(tbuf, &(filtseg[nfiltseg-1]->regions),
                   &(filtseg[nfiltseg-1]->nr));
  snprintf(tbuf, SZ_LINE, "%d ", 2*n);
  __FiltLexCat(tbuf, &(filtseg[nfiltseg-1]->shapes),
                 &(filtseg[nfiltseg-1]->ns));
  _FiltLexTypeSet(TOK_ACCEL);
  /* success */
  got = 1;

done:
  if( s ) free(s);
  return got;
}

/*
 *
 * _FiltLexRangeAdd -- add a rangelist string to the filter string buffer
 *
 */
#ifdef YY_USE_PROTOS
static void
_FiltLexRangeAdd(char *xname, char *str, int type, int n)
#else
static void _FiltLexRangeAdd(xname, str, type, n)
     char *xname;
     char *str;
     int type;
     int n;
#endif
{
  char tbuf[SZ_LINE];
  char *t=tbuf;
  char *s=str;
  char *name;
  
  /* get "in-expression" name for current technique */
  name = FilterLexName(filt, xname);
  
  /* if this is not the beginning, we first need to OR with prev */
  if( n != 0 ){
    strcpy(t, "||");
    while( *t ) t++;
  }
  
  /* put in parens for safety */
  strcpy(t, "(");
  while( *t ) t++;
  
  /* add the name */
  strcpy(t, name);
  while( *t ) t++;
  
  /* add the rangelist */
  switch(type){
  case 1:
    strcpy(t, "<=");
    while( *t ) t++;
    /* skip past : */
    s++;
    /* append upper value */
    strcpy(t, s);
    while( *t ) t++;
    break;
  case 2:
    strcpy(t, "==");
    while( *t ) t++;
    /* append value */
    strcpy(t, s);
    while( *t ) t++;
    break;
  case 3:
    strcpy(t, ">=");
    while( *t ) t++;
    /* append lower value */
    while( *s && (*s != ':') ) *t++ = *s++;
    /* skip past : */
    s++;
    strcpy(t, "&&");
    while( *t ) t++;
    strcpy(t, name);
    while( *t ) t++;
    strcpy(t, "<=");
    while( *t ) t++;
    /* append upper value */
    while( *s ) *t++ = *s++;
    break;
  case 4:
    strcpy(t, ">=");
    while( *t ) t++;
    /* append lower value */
    while( *s && (*s != ':') ) *t++ = *s++;
    break;
  }
  strcpy(t, ")");
  _FiltLexCat(tbuf);
}

/*
 *
 * _FiltLexTypeCmp -- compare routine for qsort
 *
 */
#ifdef YY_USE_PROTOS
static int
_FiltLexTypeCmp(const void *s1, const void *s2)
#else
static int _FiltLexTypeCmp(s1, s2)
     const void *s1;
     const void *s2;
#endif
{
  FiltSeg *f1 = (FiltSeg *)s1;
  FiltSeg *f2 = (FiltSeg *)s2;
  
  /* check for broken qsort */
  if( !*f1 || !*f2 ){
    _filterror("qsort is broken -- contact saord@cfa.harvard.edu");
    /* will not happen */
    return 0;
  }

  /* if both or neither are eregions, keep them in the same order */
  else if( ((*f1)->type & TOK_EREG) == ((*f2)->type & TOK_EREG) ){
    if( (*f1)->n < (*f2)->n )           return -1;
    else if( (*f1)->n > (*f2)->n )      return 1;
    else                                return 0;
  }

  /* one is an eregion -- and we want eregions last */
  else{
     if( (*f1)->type & TOK_EREG )       return 1;
     else if( (*f2)->type & TOK_EREG )  return -1;
     /* should not happen */
     else                               return 0;
  }
}

/*
 *
 * _FiltLexTypeMatch -- see if the type of filtering we are doing
 * matches the type of token we have
 *
 */
#ifdef YY_USE_PROTOS
int
_FiltLexTypeMatch(int ftype, int ttype)
#else
int _FiltLexTypeMatch(ftype, ttype)
     int ftype;
     int ttype;
#endif
{
  switch(ftype){
  case TYPE_IMAGE:
    /* we don't allow range list and col names in image filters */
    if( (ttype & TOK_RLIST) || (ttype & TOK_NAME) )
      return 0;
    /* everything else is fine */
    else
      return 1;
    break;
  case TYPE_EVENTS:
    return 1;
    break;
  default:
    return 1;
    break;
  }
}

#ifdef YY_USE_PROTOS
static int
_FiltLexArgCheck(char *name, int args)
#else
static int _FiltLexArgCheck(name, args)
      char *name;
        int args;
#endif
{
  int i;

  for(i=0; rnames[i]; i++){
    if( !strcmp(name, rnames[i]) ){
      if( args == rargs[i] ){
        return(0);
      }
      else{
        /* less than required min */
        if( args < rargs[i] )
          return(i+1);
        /* more than min args -- could be varargs */
        else{
          /* check args allowed in varargs */
          switch(vargs[i]){
          case 'e':
            if( (args%2) == 0 )
              return(-1);
            else
              return(i+1);
            break;
          case 'o':
            if( (args%2) == 1 )
              return(-1);
            else
              return(i+1);
            break;
        case 'y':
          return(-1);
          break;
          default:
            return(i+1);
            break;
          }
        }
      }
    }
  }
  return(0);
}

#ifdef YY_USE_PROTOS
static void
_FiltLexSetWcs(char *s)
#else
static void _FiltLexSetWcs(s)
      char *s;
#endif
{
  char name[SZ_LINE];
  int ip=0;

  newdtable(",=;");
  /* get name of global coordsys */
  if( word(s, name, &ip) ){
    if( gcoordsys ) free(gcoordsys);
    gcoordsys = NewString(name);
    culc(gcoordsys);
  }
  /* restore old delim table */
  freedtable();
}

#ifdef YY_USE_PROTOS
static char *
_FiltLexCB(char *name, void *client_data)
#else
static char *_FiltLexCB(name, client_data)
      char *name;
      void *client_data;
#endif
{
  FiltSeg f=(FiltSeg)client_data;
  int ip=0;
  int nr=0;
  int ns=0;
  char *s;
  char tbuf[SZ_LINE];

  if( !strcmp(name, "RS") ){
    /* get next region value and remove from string */
    if( word(f->regions, tbuf, &ip) ){
      nr = atoi(tbuf);
      s = NewString(&(f->regions[ip]));
      free(f->regions);
      f->regions = s;    
    }
    else{
      _filterror("internal error: no region string specified");
      return(NULL);
    }
    if( !inexpr || (f->type & (TOK_ACCEL|TOK_VARARGS)) ){
      snprintf(macrobuf, SZ_LINE, "%d,", nregion+1);
      nregion += nr;
      f->nregion += nr;
      inexpr = 1;
    }
    else{
      snprintf(macrobuf, SZ_LINE, "%d,", nregion);
    }

    /* get next shape value and remove from string */
    ip = 0;
    if( word(f->shapes, tbuf, &ip) ){
      ns = atoi(tbuf);
      s = NewString(&(f->shapes[ip]));
      free(f->shapes);
      f->shapes = s;    
    }
    else{
      _filterror("internal error: no shape string specified");
      return(NULL);
    }
    /* concat shape value */
    nshape++;
    snprintf(tbuf, SZ_LINE, "%d", nshape);
    strcat(macrobuf, tbuf);
    /* set new shape value */
    nshape += (ns-1);

    /* return macro value */
    return(macrobuf);
  }
  else{
    return NULL;
  }
}

/*
 *
 * _FiltLexNeedOp -- determine if we add a connecting operator for this segment
 *
 */
#ifdef YY_USE_PROTOS
static int
_FiltLexNeedOp(int i, char *s)
#else
static int _FiltLexNeedOp(i, s)
      int i;
      char *s;
#endif
{
  int c;
  /* check for operator in current string */
  if( s && *s ){
    c = *s;
    switch(c){
    case '&':
    case '|':
    case '=':
    case '!':
    case '<':
    case '>':
      return 0;
    default:
      break;
    }
  }
  /* not in this string check for operator in previous */
  for(i=i-1; i>=0; i--){
    if( !filtseg[i] || !filtseg[i]->s ) continue;
    if( strcmp(filtseg[i]->s, "(") && strcmp(filtseg[i]->s, ")") )
      break;
  }
  if( i >= 0 ){
    c = filtseg[i]->s[strlen(filtseg[i]->s)-1];
    switch(c){
    case '&':
    case '|':
    case '=':
    case '!':
    case '<':
    case '>':
      return 0;
    default:
      return 1;
    }
  }
  else{
    return 0;
  }
}

/*
 *
 * _FiltLexMake -- generate filter from filter segments
 *
 */
#ifdef YY_USE_PROTOS
static void
_FiltLexMake(void)
#else
static void _FiltLexMake()
#endif
{
  int i, j, k, l;
  int x, xtot;
  int type=0;
  int ltype=0;
  int opar=0;
  char *s;

  /* look for bad region expressions and determine how many regions we have */
  for(i=0, j=0, k=0, l=0; i<nfiltseg; i++){
    if( !filtseg[i] || !filtseg[i]->s ) continue;
    type = filtseg[i]->type;
    /* make sure we want the type being offered */
    if( !_FiltLexTypeMatch(filt->type, type) ){
      _filterror("column filters not permitted in an image filter expression");
    }
    /* look for bad combinations */
    if( (type & TOK_NREG) && !(type & TOK_IREG) )
      _filterror("!region must be combined with another region (e.g., field()&&!region)");
    if( (type & TOK_EREG) && (type & TOK_IREG) )
      _filterror("-region must not be combined with another region (use !region instead)");
    if( (type & TOK_EREG) && (type & TOK_NAME) )
      _filterror("-region must not be combined with filters (use !region instead)");
    if( (type & TOK_EREG) && (type & TOK_RLIST) )
      _filterror("-region must not be combined with range lists (use !region instead)");
    if( (type & TOK_EREG) && (type & TOK_RTINE) )
      _filterror("-region must not be combined with routines (use !region instead)");
    /* count region types */
    if( filtseg[i]->type & TOK_IREG ) j++;
    if( filtseg[i]->type & TOK_NREG ) k++;
    if( filtseg[i]->type & TOK_EREG ) l++;
  }
  /* check for fits image mask and process specially */
  if( filt->masks ){
    /* can't have fits mask and ascii regions */
    if( j || k || l ){
      _filterror("FITS image masks cannot be combined with ASCII regions");
    }
    /* image filtering of events uses a imagemask special routine */
    if( (filt->type == TYPE_EVENTS) && filt->evsect ){
      strcpy(yytext, "imagemask");
      _FiltLexRegionStart(1);
      _FiltLexRegionEnd();
    }
    else{
      __FiltLexCat("imagemask", &filter, &filtlen);
      nregion = filt->nmaskreg;
      return;
    }
  }
  /* if we have only exclude regions, add field */
  if( !j && !k && l ){
    strcpy(yytext, "field");
    if( filt->type == TYPE_EVENTS )
      _FiltLexRegionStart(1);
    else
      _FiltLexRegionStart(0);
    _FiltLexRegionEnd();
  }

  /* we want descending order so that eregions are last in the expression */
  qsort(filtseg, nfiltseg, sizeof(FiltSeg), _FiltLexTypeCmp);

  /* add open paren and mark that we did it */
  __FiltLexCat("(", &filter, &filtlen);
  opar = 1;
  /* run through segments, inserting proper boolean connectors */
  for(i=0, nregion=0; i<nfiltseg; ){
    if( filtseg[i] && filtseg[i]->s ){
      /* no type probably means its a paren, so just add it and jump out */
      if( !filtseg[i]->type ){
        __FiltLexCat(filtseg[i]->s, &filter, &filtlen);
      /* remove empty parens, if we just make them */
      x = strlen(filter);
      if( (filter[x-2] == '(') && (filter[x-1] == ')') )
        filter[x-2] = '\0';
      i++;
      continue;
      }
      /* save last type and set current type */
      ltype = type;
      type = filtseg[i]->type;
      /* close off open paren before we start exclude regions */
      if( type & TOK_EREG ){
        __FiltLexCat(")", &filter, &filtlen);
        opar  = 0;
      }
      if( _FiltLexNeedOp(i, NULL) ) inexpr=0;
      s = ExpandMacro(filtseg[i]->s, NULL, NULL, 0, _FiltLexCB, filtseg[i]);
      if( _FiltLexNeedOp(i, s) ){
      for(xtot=0, x=strlen(filter)-1; x>=0; x--){
        if( filter[x] != '(' ) break;
        filter[x] = '\0';
        xtot++;
        }
        /* if lhs and rhs are regions, implied operator is OR */
      if( (ltype & TOK_IREG) && (type & TOK_IREG) )
        __FiltLexCat("||", &filter, &filtlen);
        /* otherwise implied operator is AND */
      else
        __FiltLexCat("&&", &filter, &filtlen);
      for(x=0; x<xtot; x++){
        __FiltLexCat("(", &filter, &filtlen);
        }
      }
      __FiltLexCat(s, &filter, &filtlen);
      if( s ) free(s);
      if( filtseg[i]->radang ){
        if( *filtseg[i]->radang == ',' )
          __FiltLexCat(filtseg[i]->radang+1, &radang, &radanglen);
        else
          __FiltLexCat(filtseg[i]->radang, &radang, &radanglen);
      }
      else{
        __FiltLexCat("NA,NA,NA,NA\n", &radang, &radanglen);
      }
      i++;
      for(; (i<nfiltseg) && (filtseg[i]->type==type); ){
        if( _FiltLexNeedOp(i, NULL) ) inexpr=0;
        s = ExpandMacro(filtseg[i]->s, NULL,NULL, 0, _FiltLexCB, filtseg[i]);
      if( _FiltLexNeedOp(i, s) ){
        for(xtot=0, x=strlen(filter)-1; x>=0; x--){
          if( filter[x] != '(' ) break;
          filter[x] = '\0';
          xtot++;
          }
          /* if lhs and rhs are regions, implied operator is OR */
        if( type & TOK_IREG )
          __FiltLexCat("||", &filter, &filtlen);
          /* otherwise implied operator is AND */
        else
          __FiltLexCat("&&", &filter, &filtlen);
        for(x=0; x<xtot; x++){
          __FiltLexCat("(", &filter, &filtlen);
          }
        }
        __FiltLexCat(s, &filter, &filtlen);
        if( s ) free(s);
        if( filtseg[i]->radang ){
          if( *filtseg[i]->radang == ',' )
            __FiltLexCat(filtseg[i]->radang+1, &radang, &radanglen);
          else
            __FiltLexCat(filtseg[i]->radang, &radang, &radanglen);
        }
        else{
          __FiltLexCat("NA,NA,NA,NA\n", &radang, &radanglen);
        }
      i++;
      }
    }
    /* ignore invalid arguments */
    else{
      i++;
    }
  }
  /* close off open paren, if we have not already done so */
  if( opar ){
    __FiltLexCat(")", &filter, &filtlen);
    opar  = 0;
  }
  /* check for even number of parens */
  l = strlen(filter);
  for(i=0, j=0; i<l; i++){
    if( filter[i] == '(' ) j++;
    if( filter[i] == ')' ) j--;
  }
  if( j != 0 ){
    _filterror("unbalanced parentheses");
  }
}

/*
 *
 * _FiltLexEnd -- cleanup from parsing regions
 *
 */
#ifdef YY_USE_PROTOS
static void
_FiltLexEnd(void)
#else
static void _FiltLexEnd()
#endif
{
  int i;

  /* reset state variables */
  colargs = 0;
  initbindefs = 0;
  include_stack_ptr = 0;
  nroutine = 0;
  nshape = 0;
  nmask = 0;
  nparen = 0;
  parse_error = 0;
  filtlen = 0;
  radanglen = 0;
  regid = 0;
  regtype = 0;
  inexpr = 0;
  *regname = '\0';
  *saveang = 0;
  *(wcsnames[0]) = '\0';
  *(wcsnames[1]) = '\0';
  /* free up previous filter */
  if( filter ){
    free(filter);
    filter = NULL;
  }
  /* free up previous radang string */
  if( radang ){
    free(radang);
    radang = NULL;
  }
  /* free up wcs */
  if( wcs ){
    wcsfree (wcs);
    wcs = NULL;   
  }
  /* no segments */
  if( filtseg ){
    for(i=0; i<nfiltseg; i++){
      if( filtseg[i] ){
        if( filtseg[i]->s )         free(filtseg[i]->s);
        if( filtseg[i]->regions )   free(filtseg[i]->regions);
        if( filtseg[i]->shapes )    free(filtseg[i]->shapes);
        if( filtseg[i]->radang )     free(filtseg[i]->radang);
        free(filtseg[i]);
      }
    }
    free(filtseg);
    filtseg = NULL;
  }
  maxfiltseg = 0;
  nfiltseg = 0;
  if( gcoordsys ){
    free(gcoordsys);
    gcoordsys = NULL;
  }
  if( fcoordsys ){
    free(fcoordsys);
    fcoordsys = NULL;
  }
  cdelt1 = 0.0;
  cdelt2 = 0.0;
  crot   = 0.0;
}

/*
 *
 * _FiltLexGetWcs -- determine the WCS coord system to use for wcsc translation
 *
 */
#ifdef YY_USE_PROTOS
static char *
_FiltLexGetWcs(void)
#else
static char *_FiltLexGetWcs()
#endif
{
  if( gcoordsys &&
      strcmp(gcoordsys, "image") && strcmp(gcoordsys, "physical") )
    return gcoordsys;
  if( fcoordsys &&
      strcmp(fcoordsys, "image") && strcmp(fcoordsys, "physical") )
    return fcoordsys;
  return NULL;
}

/*
 *
 * _FiltLexWcsCols -- reset WCS for these columns
 *
 */
#ifdef YY_USE_PROTOS
static void
_FiltLexWcsCols(FITSHead iheader, char *name0, char *name1)
#else
static void _FiltLexWcsCols(iheader, name0, name1)
      FITSHead iheader;
      char *name0;
      char *name1;
#endif
{
  int i, which, ival;
  int simple=1;
  double dval, dval2;
  char *s;
  FITSHead oheader;    
  FITSCard card;
  
  /* make sure we have something to process */
  if( !iheader )
    return;

  if( filt->fhd->image ){
    /* free up old wcs */
    if( wcs ) wcsfree (wcs);
    /* init new wcs */
    hlength(ft_cards(filt->fhd),0);
    wcs = wcsinit(ft_cards(filt->fhd));
    tltyp[0] = 0;
    tltyp[1] = 0;
  }
  /* for tables, we can init wcs only the specified columns */
  else if( name0 && *name0 && name1 && *name1 ){
    /* see if these are the same as the last set of columns */
    if( (*(wcsnames[0]) && !strcasecmp(name0,wcsnames[0])) && 
        (*(wcsnames[1]) && !strcasecmp(name1,wcsnames[1])) && wcs ){
      return;
    }

    /* gather up important tl info about the binning columns */
    for(i=1; i<=iheader->table->tfields; i++){
      /* determine which bincol we are processing */
      if( !strcasecmp(iheader->table->col[i-1].name, name0) )
        which = 0;
      else if( !strcasecmp(iheader->table->col[i-1].name, name1) )
        which = 1;
      else
        continue;
      /* set tlinfo values for this column */
      tlmin[which] = ft_headgetr(iheader, "TLMIN", i, 1.0, &card);
      tlmax[which] = ft_headgetr(iheader, "TLMAX", i, 1.0, &card);
      binsiz[which] = ft_headgetr(iheader, "TDBIN", i, 1.0, &card);
      tltyp[which] = iheader->table->col[i-1].type;
    }

    /* free up old wcs */
    if( wcs ) wcsfree (wcs);
    /* make a copy of the header */
    oheader = ft_headcopy(iheader);

    /* make sure this is a primary FITS file */
    ft_cardfmt((FITSCard)oheader->cards, 
             "SIMPLE", 0, FT_LOGICAL, &simple, 0, "Standard FITS");
    /* set dimension info, used by wcs code */
    ft_headseti(oheader, "NAXIS", 0, 2, "number of axes", 1);
    /* set dimension info */
    for(i=0; i<=1; i++){
      ival = (int)tldim(tlmin[i], tlmax[i], binsiz[i], tltyp[i]);
      ft_headseti(oheader, "NAXIS", i+1, ival, "axis dimension", 1);
    }
    /* set bitpix */
    ft_headseti(oheader, "BITPIX", 0, 32, "bits/pixel", 1);
    /* synchronize the header and the cards after any changes */
    ft_syncdata(oheader);

    /* transform WCS cards for the specified columns, if we have such */
    for(i=1; i<=iheader->table->tfields; i++){
      /* determine which bincol we are processing */
      if( !strcasecmp(iheader->table->col[i-1].name, name0) )
        which = 0;
      else if( !strcasecmp(iheader->table->col[i-1].name, name1) )
        which = 1;
      else
        continue;
      /* convert event wcs header info image wcs info */
      if( (s=ft_headgets(iheader, "TCTYP", i, NULL, &card)) && card ){
        ft_headapps(oheader, "CTYPE", which+1, s, NULL);
        free(s);
      }
      if( (s=ft_headgets(iheader, "TCRVL", i, NULL, &card)) && card ){
        ft_headappv(oheader, "CRVAL", which+1, s, NULL);
        free(s);
      }
      if( (s=ft_headgets(iheader, "TCDLT", i, NULL, &card)) && card ){
        ft_headappv(oheader, "CDELT", which+1, s, NULL);
        free(s);
      }
      if( (s=ft_headgets(iheader, "TCROT", i, NULL, &card)) && card ){
        ft_headappv(oheader, "CROTA", which+1, s, NULL);
        free(s);
      }
      /* this value gets converted from physical to image */
      if( (dval=ft_headgetr(iheader, "TCRPX", i, 0.0, &card)) && card ){
        dval2 = tlp2i(dval, tlmin[which], binsiz[which], tltyp[which]);
        ft_headsetr(oheader, "CRPIX", which+1, dval2, 7, NULL, 1);
      }
    }

    /* init new wcs */
    hlength(ft_cards(oheader),0);
    wcs = wcsinit(ft_cards(oheader));
    ft_headfree(oheader, 1);
    /* save names for next time */
    strcpy(wcsnames[0], name0);
    strcpy(wcsnames[1], name1);
  }

  /* set some extra wcs parameters */
  if( wcs && iswcs(wcs) ){
    if( fcoordsys ) free(fcoordsys);
    fcoordsys = NewString(wcs->radecin);
    culc(fcoordsys);
    if( !wcs->coorflip ){
      cdelt1 = wcs->cdelt[0];
      cdelt2 = wcs->cdelt[1];
    }
    else{
      cdelt1 = wcs->cdelt[1];
      cdelt2 = wcs->cdelt[0];
    }
    crot = wcs->rot;
  }
  else{
    cdelt1 = 0.0;
    cdelt2 = 0.0;
    crot   = 0.0;
  }
  /* set global coord system first time through */
  if( !gcoordsys ){
    if( (gcoordsys=NewString(getenv("COORDSYS"))) == NULL )
      gcoordsys = NewString(DEFAULT_COORDSYS);
  }
}

/*
 *
 * _FiltLexLcx -- determine if we have a linear-type WCS
 *
 */
#ifdef YY_USE_PROTOS
static int
_FiltLexLcx(void)
#else
static int _FiltLexLcx()
#endif
{
  char *coordsys;
  coordsys = gcoordsys;
  if( !coordsys || !*coordsys )
    return 0;
  if( !strcasecmp(coordsys, "image")     ) return LCX_IMAGE;
  if( !strcasecmp(coordsys, "physical")  ) return LCX_PHYS;
  if( !strcasecmp(coordsys, "amplifier") ) return LCX_AMP;
  if( !strcasecmp(coordsys, "detector")  ) return LCX_DET;
  return 0;
}

#ifdef YY_USE_PROTOS
static void
_FiltLexNum(int lcx)
#else
static void _FiltLexNum(lcx)
      int lcx;
#endif
{
  /* for linear coordinate systems (physical, amps, etc.),
     we have to convert to image coords or physical coords,
     depending on the type of data and type of filtering */
  if( lcx ){
    /* data is in a table: we can use image or physical coords */
    if( filt->fhd->table ){
      /* if we want to use physical coordinates ... */
      if( USEPHYS ){
        /* convert image positions to physical coords */
      if( lcx == LCX_IMAGE ){
        if(  POSARG ){
          dval = tli2p(strtod(yytext,NULL),
             tlmin[(narg+1)%2], binsiz[(narg+1)%2], tltyp[(narg+1)%2]);
          snprintf(sbuf, SZ_LINE, DFMT1, dval);
          _FiltLexCat(sbuf);
            _FiltLexArgSave(dval);
          }
          /* angle arguments are just passed along */
        else if( ANGARG ){
          dval = strtod(yytext,NULL);
          snprintf(sbuf, SZ_LINE, DFMT1, dval);
          _FiltLexCat(sbuf);
            _FiltLexArgSave(dval);
          }
          /* panda numeric args are just passed along */
          else if( NUMARG ){
            dval = strtod(yytext,NULL);
            snprintf(sbuf, SZ_LINE, DFMT1, dval);
            _FiltLexCat(sbuf);
          }
        /* size arguments have to be converted using the binsize */
        else{
            if( SAVEANG ){
            dval = strtod(yytext,NULL);
            snprintf(saveang, SZ_LINE, DFMT1, dval);
            }
          dval = strtod(yytext,NULL) * binsiz[(narg+1)%2];
          snprintf(sbuf, SZ_LINE, DFMT1, dval);
          _FiltLexCat(sbuf);
            _FiltLexArgSave(dval);
          }
        }
        /* already in physical -- just pass along args */
        else{
        dval = strtod(yytext,NULL);
        snprintf(sbuf, SZ_LINE, DFMT1, dval);
        _FiltLexCat(sbuf);
          _FiltLexArgSave(dval);
        }
      }
      /* we are using image coords (image-style filtering) */
      else{
      /* convert non-image positions to image coords */
      if( lcx != LCX_IMAGE ){
          if( POSARG ){
          dval = tlp2i(strtod(yytext,NULL),
             tlmin[(narg+1)%2], binsiz[(narg+1)%2], tltyp[(narg+1)%2]);
          snprintf(sbuf, SZ_LINE, DFMT1, dval);
          _FiltLexCat(sbuf);
            _FiltLexArgSave(dval);
          }
          /* angle arguments are just passed along */
        else if( ANGARG ){
          dval = strtod(yytext,NULL);
          snprintf(sbuf, SZ_LINE, DFMT1, dval);
          _FiltLexCat(sbuf);
            _FiltLexArgSave(dval);
          }
          /* panda numeric args are just passed along */
          else if( NUMARG ){
            dval = strtod(yytext,NULL);
            snprintf(sbuf, SZ_LINE, DFMT1, dval);
            _FiltLexCat(sbuf);
          }
        /* size arguments have to be converted using the binsize */
        else{
            if( SAVEANG ){
            dval = strtod(yytext,NULL);
            snprintf(saveang, SZ_LINE, DFMT1, dval);
            }
          dval = strtod(yytext,NULL) / binsiz[(narg+1)%2];
          snprintf(sbuf, SZ_LINE, DFMT1, dval);
          _FiltLexCat(sbuf);
            _FiltLexArgSave(dval);
          }
        }
        /* already in image -- just pass along args */
        else{
        dval = strtod(yytext,NULL);
        snprintf(sbuf, SZ_LINE, DFMT1, dval);
        _FiltLexCat(sbuf);
          _FiltLexArgSave(dval);
        }
      }
    }
    /* data is in an image: we use image coords */
    else{
      /* convert positional arguments to image */
      if( POSARG ){
      /* save x value for processing with y next time */
      if( XARG ){
        xpos = SAOstrtod(yytext,NULL);
      }
      else{
        ypos = SAOstrtod(yytext,NULL);
        switch(lcx){
        case LCX_IMAGE:
          xpix = xpos;
            ypix = ypos;
            break;
        case LCX_PHYS:
          ft_phy2img(filt->fhd, xpos, ypos, &xpix, &ypix);
          break;
        case LCX_AMP:
          ft_amp2phy(filt->fhd, xpos, ypos, &dval, &dval2);
          ft_phy2img(filt->fhd, dval, dval2, &xpix, &ypix);
          break;
        case LCX_DET:
          ft_det2phy(filt->fhd, xpos, ypos, &dval, &dval2);
          ft_phy2img(filt->fhd, dval, dval2, &xpix, &ypix);
          break;
        }
        snprintf(sbuf, SZ_LINE, DFMT2, xpix, ypix);
        _FiltLexCat(sbuf);
      }
      }
      /* angle arguments are just passed along, with updated crot */
      else if( ANGARG ){
      dval = strtod(yytext,NULL);
        if( USEWCS ) dval += crot;
      snprintf(sbuf, SZ_LINE, DFMT1, dval);
      _FiltLexCat(sbuf);
      }
      /* panda numeric args are just passed along */
      else if( NUMARG ){
        dval = strtod(yytext,NULL);
        snprintf(sbuf, SZ_LINE, DFMT1, dval);
        _FiltLexCat(sbuf);
      }
      /* convert size args, which may or may not be in pairs */
      else{
        if( SAVEANG ){
        dval = strtod(yytext,NULL);
          if( USEWCS ) dval += crot;
        snprintf(saveang, SZ_LINE, DFMT1, dval);
        }
      /* arg 1 is associated with ra, arg2 with dec */
      if( XARG ){
        xpos = ABS(strtod(yytext,NULL));
        ypos = 0.0;
        switch(lcx){
        case LCX_IMAGE:
            xpix = xpos;
            break;
        case LCX_PHYS:
          ft_phy2img_size(filt->fhd, xpos, ypos, &xpix, &ypix);
          break;
        case LCX_AMP:
          ft_amp2phy_size(filt->fhd, xpos,ypos, &dval,&dval2);
          ft_phy2img_size(filt->fhd, dval,dval2, &xpix,&ypix);
          break;
        case LCX_DET:
          ft_det2phy_size(filt->fhd, xpos,ypos, &dval,&dval2);
          ft_phy2img_size(filt->fhd, dval,dval2, &xpix,&ypix);
          break;
        }
        snprintf(sbuf, SZ_LINE, DFMT1, xpix);
          _FiltLexArgSave(xpix);
      }
      else{
        xpos = 0.0;
        ypos = ABS(strtod(yytext,NULL));
        switch(lcx){
        case LCX_IMAGE:
            ypix = ypos;
            break;
        case LCX_PHYS:
          ft_phy2img_size(filt->fhd, xpos, ypos, &xpix, &ypix);
          break;
        case LCX_AMP:
          ft_amp2phy_size(filt->fhd, xpos,ypos, &dval,&dval2);
          ft_phy2img_size(filt->fhd, dval,dval2, &xpix,&ypix);
          break;
        case LCX_DET:
          ft_det2phy_size(filt->fhd, xpos,ypos, &dval,&dval2);
          ft_phy2img_size(filt->fhd, dval,dval2, &xpix,&ypix);
          break;
        }
        snprintf(sbuf, SZ_LINE, DFMT1, ypix);
          _FiltLexArgSave(ypix);
      }
      _FiltLexCat(sbuf);
      }
    }
  }
  /* not lcx -- angle arguments are just passed along with updated crot */
  else if( ANGARG ){
    dval = strtod(yytext,NULL);
    if( USEWCS ) dval += crot;
    snprintf(sbuf, SZ_LINE, DFMT1, dval);
    _FiltLexCat(sbuf);
  }
  /* panda numeric args are just passed along */
  else if( NUMARG ){
    dval = strtod(yytext,NULL);
    snprintf(sbuf, SZ_LINE, DFMT1, dval);
    _FiltLexCat(sbuf);
  }
  /* not lcx -- everything else is assumed to be in units of "degrees"
     in the default system. add 'd' and put back for reparsing */
  else{
    int i;
    char *yycopy = strdup(yytext);
    unput('d');
    for(i=yyleng-1; i>=0; --i)
      unput(yycopy[i]);
    free(yycopy);
    narg--;
  }
}

#ifdef YY_USE_PROTOS
static int
_FiltIncMask(FilterMask masks, int maxmask, int nmask)
#else
static int _FiltIncMask(masks, maxmask, nmask)
  FilterMask masks;
  int maxmask;
  int nmask;
#endif
{
  int omax;
  nmask++;
  if( nmask >= maxmask ){
    omax = maxmask;
    maxmask += MASKINC;
    masks = (FilterMask)realloc(masks, maxmask*sizeof(FilterMaskRec));
    memset(masks+omax, 0, (maxmask-omax)*sizeof(FilterMaskRec));
  }
  return nmask;
}

#ifdef YY_USE_PROTOS
static int
_FiltFitsMask(char *filename, FilterMask *rmasks, FITSHead *rhead, int *nreg)
#else
static int _FiltFitsMask(filename, rmasks, rhead, nreg)
  char *filename;
  FilterMask *rmasks;
  FITSHead *rhead;
  int *nreg;
#endif
{
  short *dptr;
  short *data=NULL;
  int x, y;
  int maxreg=-1;  
  int maxmask;                /* max masks allocated thus far */
  int nmask=0;                /* number of mask segments */
  FilterMask masks=NULL;      /* array valid region masks for one row */
  FITSHead  head=NULL;
  
  /* read fits image */
  if( !ft_simpleimageread(filename, &head, (void *)&data, NULL, 16) ){
    return(-1);
  }
  if( !head->image ){
    if( data ) free(data);
    if( head ) ft_headfree(head, 1);
    return(-2);
  }
  if( !ft_naxes(head) || !ft_naxis(head, 1) || !ft_naxis(head, 2) ){
    if( data ) free(data);
    if( head ) ft_headfree(head, 1);
    return(-3);
  }

  /* allocate an array of masks, which will be returned to caller */
  maxmask = MASKINC;
  masks = (FilterMask)calloc(maxmask, sizeof(FilterMaskRec));
  /* seed the first region mask value */
  masks[nmask].region = 0;
  /* loop through y rows */
  for(y=1; y<=ft_naxis(head, 2); y++){
    dptr = data + ((y-1) * ft_naxis(head, 1));
    /* to start this line, we make a seed mask with no region */
    if( masks[nmask].region ){
      nmask = _FiltIncMask(masks, maxmask, nmask);
      masks[nmask].region = 0;
    }
    /* process each pixel in the row */
    for(x=1; x<=ft_naxis(head, 1); x++, dptr++){
      /* we do not allow negative values */
      if( *dptr < 0 ){
        if( data ) free(data);
        if( head )  ft_headfree(head, 1);
        if( masks ) free(masks);
        return(-4);
      }
      /* set max region as needed */
      if( *dptr > maxreg )
        maxreg = *dptr;
      /* look for a change in the mask */
      if( *dptr != masks[nmask].region ){
      /* if previous was non-zero region, finish it and bump to next */
      if( masks[nmask].region ){
        masks[nmask].xstop = x - 1;
        nmask = _FiltIncMask(masks, maxmask, nmask);
      }
      masks[nmask].y = y;
      masks[nmask].region = *dptr;
      masks[nmask].xstart = x;
      }
    }
    /* finish last non-zero segment, inc number of mask segs */
    if( masks[nmask].region ){
      masks[nmask].xstop = x;
      nmask = _FiltIncMask(masks, maxmask, nmask);
    }
  }

  /* free up data space */
  if( data ) free(data);
  /* allocate just enough mask space */
  masks = (FilterMask)realloc(masks, nmask*sizeof(FilterMaskRec));
  if( rmasks )
    *rmasks = masks;
  else
    free(masks);
  if( rhead )
    *rhead = head;
  else
    ft_headfree(head, 1);
  if( nreg )
    *nreg = maxreg;

  return(nmask);
}

/*
 *
 * Semi-public Routines 
 *
 *
 */

/*
 *
 * _FilterString -- return output filter from lexer
 *
 */
#ifdef YY_USE_PROTOS
char *
_FilterString(void)
#else
char *_FilterString()
#endif
{
  if( filtlen <= 0 )
    _FiltLexMake();
  return(filter);
}

#ifdef YY_USE_PROTOS
int
FilterRoutineCount(void)
#else
int FilterRoutineCount()
#endif
{
  return(nroutine);
}

#ifdef YY_USE_PROTOS
int
FilterShapeCount(void)
#else
int FilterShapeCount()
#endif
{
  return(nshape);
}

#ifdef YY_USE_PROTOS
int
FilterRegionCount(int type)
#else
int FilterRegionCount(type)
      int type;
#endif
{
  int i, j;

  /* handle fits image masks specially */
  if( nmask ){
    if( type & TOK_IREG )
      return(nregion);
    else
      return(0);    
  }

  /* normal regions */
  for(i=0, j=0; i<nfiltseg; i++){
    if( filtseg[i]->type & type ){
      j += filtseg[i]->nregion;
    }
  }
  return(j);
}

#ifdef YY_USE_PROTOS
char *
FilterRadAng(void)
#else
char *FilterRadAng()
#endif
{
  return(radang);
}

#ifdef YY_USE_PROTOS
int
FilterParseError(void)
#else
int FilterParseError()
#endif
{
  return(parse_error);
}

#ifdef YY_USE_PROTOS
int
FilterTlInfo(double *tlmins, double *binsizs, int *tltyps)
#else
int FilterTlInfo(tlmins, binsizs, tltyps)
      double *tlmins;
      double *binsizs;
      int *tltyps;
#endif
{
  tlmins[0] = tlmin[0];
  tlmins[1] = tlmin[1];
  binsizs[0] = binsiz[0];
  binsizs[1] = binsiz[1];
  tltyps[0] = tltyp[0];
  tltyps[1] = tltyp[1];
  return 1;
}

#ifdef YY_USE_PROTOS
void
FiltInitParser(void)
#else
void FiltInitParser()
#endif
{
  static int parser = 0;
  /* make sure we free'd up all space from last time */
  _FiltLexEnd();
  /* set up some convenience variables */
  filt = FilterDefault();
/*
  if( parser )
    yyrestart(NULL);
*/
  BEGIN INITIAL;
  parser++;
  laststart=INITIAL;
}

#ifdef YY_USE_PROTOS
void
FiltScanString(char *s)
#else
void FiltScanString(s)
     char *s;
#endif
{
  int i;
  char *t;
  /* make sure there is an explicit delim at end so we are done before
     lex finds EOF -- otherwise panda shapes don't get processed */
  i = strlen(s);
  t = malloc(i+2);
  strcpy(t, s);
  if( (t[i-1] != ';') && (t[i-1] != '\n') )
    strcat(t, "\n");
  yy_scan_string(t);
  if( t ) free(t);
}

/* yyerror -- renamed to _filterror because flex -P does not change this */
#ifdef YY_USE_PROTOS
int
_filterror(char *msg)
#else
int _filterror(msg)
     char *msg;
#endif
{
  if( yytext && *yytext )
    gerror(stderr,  "%s while parsing filter at: %s\n",
           msg ? msg : "filterr", yytext);
  else
    gerror(stderr,  "%s\n", msg ? msg : "filterr");
  YY_FLUSH_BUFFER;
  parse_error = 1;  
  yyterminate();
}

#ifdef YY_USE_PROTOS
int yywrap(void)
#else
int yywrap()
#endif
{
  return 1;
}

Generated by  Doxygen 1.6.0   Back to index