#include <iostream>
#include <cstring>
#include <cstdlib>
#include <cstdio>
#include <cmath>
#include <vector>
using namespace std;
const int MAXN=5e5+5,MAXM=1e6+5,mod=998244353;
int n,m;
int head[MAXN],u[MAXM],v[MAXM],Map[5001][5001];
long long ans=0;
struct road
{
	int v ,nxt,id ;
} edge[MAXM*2];
void read(int &x)
{
	char ch=getchar();
	x=0;
	int f =1;
	while (ch>'9' || ch<'0')
	{
		if ( ch=='-')
			f=-1;
		ch=getchar();
	}
	while (ch<='9' && ch>='0')
	{
		x=(x<<3)+(x<<1)+ch-'0';
		ch=getchar();
	}
	x*=f;
}
int cnt;
void add_edge(int u,int v,int id)
{
	edge[++cnt].v =v ;
	edge[cnt].nxt =head[u];
	edge[cnt].id =id;
	head[u]=cnt;
}
int vis[MAXN];
//int e[1<<25],ppc[1<<25],g[1<<25],f[1<<25],bit[25];
int check(int x,int sta)
{
	int to =1<<(x-1);
	for (int i=head[x];i;i=edge[i].nxt )
	{
		int y =edge[i].v ;
		if ((!vis[y]) && (edge[i].id !=sta))
		{
			vis[y]=1;
			to|=1<<(y-1);
			to|=check(y,sta);
		}
	}
	return to;
}
bool fl=0;
//int dfn[MAXN],low[MAXN],cnt_node,cut[MAXM],sta[MAXN],top;
int cnt3,bit[30],f[1<<25];
int main()
{
	freopen("barrack.in","r",stdin);
	freopen("barrack.out","w",stdout);
	read(n),read(m);
	for (int i=1;i<=m;i++)
	{
		//int x,y;
		read(u[i]),read(v[i]);
		add_edge(u[i],v[i],i);
		add_edge(v[i],u[i],i);
		if (u[i]!=v[i]+1 && v[i]!=u[i]+1)
			fl=1;
	}
	/*for (int i=1;i<1<<n;i++)
		ppc[i]=ppc[i<<1]+(i&1);
	bit[0]=1;
	for (int i=1;i<=n;i++)
		bit[i]=1LL*bit[i-1]*2%mod;
	for (int i=0;i<1<<n;i++)
	{
		for (int u=1;u<=n;u++)
		{
			if ((i>>(u-1))&1)
			for (int v=u+1;v<=n;v++)
			{
				if ((i>>(v-1))&1)
					e[i]+=Map[u][v];
			}
		}
	}
	for (int i=0;i<1<<n;i++)
	{
		if (ppc[i]==1)
		{
			g[i]=1;
			f[i]=1;
			continue;
		}
		int must=i&-i;
		f[i]=bit[e[i]];
		for (int j=(i-1)&i;j;j=(j-1)&i)
		{
			if (j&must)
				g[i]=(1LL*f[i^j]*f[j]%mod+g[i])%mod;
		}
		f[i]=(f[i]-g[i]+mod)%mod;
	}
	for (int i=0;i<1<<n;i++)
		printf("%d %d\n",i,f[i]);
	int full=(1<<n)-1;
	for (int i=1;i<1<<n;i++)
	{
		ans=(ans+1LL*bit[(e[full]-e[i])]*f[i]%mod)%mod;
	}*/
	if (n<=8)
	{
		for (int sta=1;sta<1<<n;sta++)
		{
			for (int sta2=0;sta2<1<<m;sta2++)
			{
				int add=1;
				for (int k=1;k<=m;k++)
				{
					if ((sta2>>k-1)&1)
						continue ;
					for (int i=1;i<=n;i++)
						vis[i]=0;
					for (int i=1;i<=n;i++)
					{
						if ((sta>>(i-1))&1)
						{
							if ((check(i,k)&sta)!=sta)
								add=0;
							break;
						}
					}
					if (!add)	break;
				}
				ans+=add;
			}
		}
		printf("%lld",ans);
	}
	else if (n<=16)
	{
		int full=(1<<n)-1;
		bit[0]=1;
		for (int i=1;i<=n;i++)
			bit[i]=1LL*bit[i-1]*2%mod;
		for (int i=1;i<=m;i++)
		{
			for (int i=1;i<=n;i++)
				vis[i]=0;
			int to=check(1,i);
			if (to!=full)
			{
				int tt=full^to;
				for (int i=to;i;i=(i-1)&to)
					for (int j=tt;j;j=(j-1)&tt)
						f[i|j]++;
			}
		}
		for (int i=1;i<1<<n;i++)
			ans=(ans+1LL*bit[(m-f[i])])%mod;
		printf("%lld",ans);		
	}
	else if (!fl)
	{
		bit[0]=1;
		for (int i=1;i<=n;i++)
			bit[i]=1LL*bit[i-1]*2%mod;
		ans=(ans+1LL*bit[n-1]*n)%mod;
		for (int i=1;i<=n-1;i++)
			ans=(ans+1LL*bit[n-2]*(n-i)%mod)%mod;
		printf("%lld",ans);
	}
//	printf("%lld",ans);*/
	return 0;
}